开发者

Weird behaviour of the app.config deployment after updating it

I moved some hardcoded settings to a custom Section (so I did not use the <appSetting> tag) in the app.config of my ClickOnce application. When updating, the clients got an error stating that the server gave a 404 not found error for the file "myapp.exe.config.deploy". Browsing on the server I did find the changed app.config there, only it was named app.config.deploy.

Thinking to be smart I renamed the app.config to myapp.exe.config on the development machine and published again. That did not work... However after naming the file back to app.config and publishing the error went away and the clients used the setting happily!

Please ex开发者_开发百科plain what went wrong?


In the properties of the app.config I had set the build action to Content and the Copy to outputdirectoru to Always Copy. Setting these properties to None and Do not copy made the problem go away while the program still successfully reads and writes from the condfiguration settings. Weird, but OK, it works!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜