无法识别对 xml 文件的更改 - ASP.NET
我读取了一个 xml 文件 (myConfig.config
) 并将其作为 CLR 方法的输入提供。当我更改此 xml 文件时,它似乎无法识别它。当此行引发错误时,我总是看到文件的第一个版本作为错误消息的一部分。
在配置文件属性中,我已将复制到输出目录
设置为始终复制
,但它似乎仍然不起作用。
有什么想法吗?
I read a xml file (myConfig.config
) and provide it as an input to a CLR method. When I make changes to this xml file, it doesn't seem to be recognizing it. When this line throws an error, I always see the first version of the file as a part of the error message.
In the config file properties, I have set Copy to Output Directory
as Copy always
, but it still doesn't seem to work.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
复制始终适用于 BIN 文件包含 exe 的 Windows;您的网站不一定需要它...您的代码是什么样的?保存发生在哪里?
Copy Always works for windows where the BIN file contains the exe; you don't need that for web sites necessarily... What does your code look like? Where does the save occur?
我通过执行“如果较新则复制”选项来实现此功能
I got this to work by doing a "Copy if newer" option