如何在安装过程中修改.NET配置文件?(How to modify .NET config files during installation?)
我使用app.config文件来存储一些值(映射数据库的路径,数据连接选择)。 这些设置在用户机器上有所不同,我希望安装程序设置正确。 有没有安装程序可以在安装过程中使用.NET配置文件,并允许我创建一些对话框,以帮助我填写这些值?
我知道这个问题可能类似于: 在安装期间初始化user.config或app.exe.config ,但我不限于VS 2008安装项目,我想更改配置文件中的设置。
编辑:我看到使用WIX是一个选择,但我觉得用大锤打破核桃。 这可能是唯一的解决方案,但我仍然希望一些简单的东西。
I use the app.config file to store some values (path to a mapping database, data connection selections). These settings differ on the user machines and I would like the installer to set them right. Is there an installer that can work with .NET config files during setup and allow me to create some dialogs that would help me fill in these values ?
I know this question may be similar to : Initializing user.config or app.exe.config during install, but I am not limited to VS 2008 setup project and I want to change the settings in the config files.
EDIT: I see that using WIX is one option, but I feel like cracking a walnut with a sledgehammer. It may be the only solution, but I still hope for something simple.
原文:https://stackoverflow.com/questions/289773