为什么VS删除applicationname.exe.config文件?
我有一个奇怪的事实。
在调试模式下启动我的项目时,Visual Studio 会删除我的 applicationname.exe.config 文件。
但如果我手动启动它或者我正在执行“不使用调试器启动”,那就没问题了。
我没有将 app.config 文件放入项目中(如果我这样做了,它将在每次编译后复制)。所以 Visual Studio 正在删除一个“松散”的文件。
我应该怎么做才能避免这种情况?
问候,
I've got a weird fact.
When launching in debug mode my project, visual studio erase my applicationname.exe.config file.
But if i launch it manually or i'm doing "launch without debugger" it's fine.
I don't have put an app.config file into the project (if i did it, it will be copied after each compile). So visual studio is erasing a "loose" file.
What should i do in order to avoid this ?
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信 VS 在重建时会清除整个 bin 目录。不可避免的,您需要添加 app.config (您不这样做的原因是什么?)
I believe VS clears the entire bin directory when you do a rebuild. Not avoidable, you'll need to add the app.config (what is your reason not to?)