简体   繁体   English

为什么 VS2015 生成旧的/不正确的 app.exe.config 文件?

[英]Why is VS2015 generating old/incorrect app.exe.config file?

I'm working on a windows service and using SlowCheetah to manage the transforms.我正在开发 Windows 服务并使用 SlowCheetah 来管理转换。 I added some settings and therefore updated the app.config file for the first time in months, and for some reason when I build the Debug configuration it generates an old version of app.config with a modify date from six weeks ago (Jan 3rd.)我添加了一些设置,因此几个月来第一次更新了 app.config 文件,出于某种原因,当我构建 Debug 配置时,它生成了一个旧版本的 app.config,修改日期是六周前(1 月 3 日)。 )

To make matters worse, looking through the source control history it doesn't look like the file was ever checked in with the changes that are showing up when I build.更糟糕的是,查看源代码控制历史记录,看起来文件并没有在我构建时显示的更改中签入。 That is, one setting is set to a different url for me to test something... but that was never checked in.也就是说,一个设置被设置为不同的 url 供我测试某些东西......但从未签入过。

If I build in Release or Test configurations it works perfectly.如果我在发布或测试配置中构建它,它可以完美运行。

I've tried:我试过了:

  • cleaning/rebuilding the solution清洁/重建解决方案
  • Deleting/recreating the the app.config file (It generated the 1/3 version even - when I build with file deleted!)删除/重新创建 app.config 文件(它甚至生成了 1/3 版本 - 当我在删除文件的情况下构建时!)
  • Restarting Visual Studio重新启动 Visual Studio
  • Rebooting my computer重新启动我的电脑

Nothing works and none of the changes I make in the config file are reflected when I build Debug.什么都不起作用,我在配置文件中所做的任何更改都不会在我构建 Debug 时反映出来。

Any ideas why or how to fix it?任何想法为什么或如何解决它?

Did you try looking at the post build section?您是否尝试查看后期构建部分? Sounds like something there is overriding the built version with a previous one.听起来像是用以前的版本覆盖了内置版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM