我有一個名爲JIMS.Printing.dll的dll,放在主應用程序JIMS.exe的Reporting文件夾中。在.Net中獲取實際的dll路徑
但在調用模板文件夾內JIMS.Printing.dll代碼中報告裏面的一些文件,其運行JIMS.exe
時,我得到一個錯誤JIMS.exe
--------->Reporting
------------------->JIMS.Printing.dll
------------------->Templates
-----------------------------> Files
代碼:
string _templatePath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(JIMS.Printing.PrintInvoice)).Location), "Templates");
代碼來自JIMS.Printing.dll
JIMS.exe尋找JIMS.exe路徑\模板\文件裏面的文件, 但實際上這個文件在JIMS.Printing.dll路徑\模板\文件
什麼是錯誤?你的問題是什麼? – prprcupofcoffee