简体   繁体   English

允许用户编辑ClickOnce安装的app.config文件

[英]Allow user to edit app.config file for ClickOnce installation

I have published a small program through ClickOnce in VS 2012. This has generated a app.exe.config.deploy file but no app.config file. 我已经通过VS 2012中的ClickOnce发布了一个小程序。这生成了一个app.exe.config.deploy文件但没有app.config文件。 I need the user to be able to enter a sql connection string, a few email addresses and other things into the app.config file but currently don't have this option. 我需要用户能够在app.config文件中输入sql连接字符串,一些电子邮件地址和其他内容,但目前没有此选项。 I know this seems to be an issue as old as time but I can't find a resolution online. 我知道这似乎是一个时间问题,但我无法在网上找到解决方案。 This is the first application that I have ever published. 这是我发布的第一个应用程序。 I've tried taking off signing and hashing of the config file but that didn't work. 我已经尝试取消配置文件的签名和散列,但这不起作用。 Any helpful advice in SO land? SO土地上有什么有用的建议吗?

Technically not the answer I was looking for but I changed my build setting to Release by going to Build --> Configuration Manager --> Active Solution Configuration --> Release. 技术上不是我想要的答案,但我通过转到Build - > Configuration Manager - > Active Solution Configuration - > Release将我的构建设置更改为Release。 I built the solution again and this gave me a Release folder in \\Bin with all the files including the .config file I was hunting. 我再次构建了解决方案,这给了我一个在\\ Bin中的Release文件夹,其中包含我正在搜索的.config文件。 Hope this helps somebody else. 希望这有助于其他人。 It is worth noting that my program is very small, will not be frequently updated and can easily be repackaged and distributed to the one user who will need it. 值得注意的是,我的程序非常小,不会经常更新,并且可以轻松地重新打包并分发给需要它的用户。

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

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