我已经创建了一个多语言支持的自定义函数。在这个函数中,我使用语言文件的路径作为变量。但是,当我调用Directory.GetCurrentDirectory()、System.AppDomain.CurrentDomain.BaseDirectory或其他方法来获取报表模板文件位置时,它始终返回'TelerikReportDesigner.exe‘的路径和dll文件所在的位置(C:\Program Files (x86)\Telerik\Reporting Q1 2016\Report Designer)。但我的模板文件位于另一个文件夹中(例如:- E:\Reports..)如何在自定义函数中获取模板文件的位置?
发布于 2017-03-24 22:14:23
你试过Assembly.GetExecutingAssembly().CodeBase吗?可以在此处引用完整的代码示例:How do I get the path of the assembly the code is in?
https://stackoverflow.com/questions/36276362
复制相似问题