为什么VS删除applicationname.exe.config文件?

发布于 2024-10-20 07:35:38 字数 253 浏览 13 评论 0原文

我有一个奇怪的事实。

在调试模式下启动我的项目时,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抚你发端 2024-10-27 07:35:39

我相信 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?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文