0
我写了下面的代码来加载xml文件。安装windows服务后出现错误的xml文件路径
XDocument doc = XDocument.Load(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\Configurations.xml");
这是工作的罚款,如果我调试使用Visual Studio的代码,它是找到文件安装后但在这个位置
Could not find file 'C:\Windows\system32\Configurations.xml'.
如何解决一样吗?