SSIS 部署:开发阶段实时应用程序设置
主要问题是:如何将 appSettings.Config 文件与特定构建(dev、stage、live)合并?
我的 appSettings.Config 根据包的服务器更改数据源的 conx 字符串正在部署到。我可以完成包配置并添加我的 appSettings.Config,但是,我只能专门添加一个文件 dev、stage 或 live。我需要做的是能够构建解决方案并基于构建类型合并开发/阶段/实时应用程序设置。我怎么能这样做呢?
The main problem is: How do i incorporate an appSettings.Config file with a particular build(dev, stage, live)?
My appSettings.Config changes the conx strings for data sources based on which server the package is being deployed to. I am able to go through Package configurations and add my appSettings.Config, however, I can only specifically add one file dev, stage, or live. What i need to do is be able to build the solution and based on teh build type incorporate the dev/stage/live appsettings. How could I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在安装中包含所有配置文件,然后只需通过环境变量指向正确的配置文件。我知道您想要根据解决方案构建配置切换配置文件,但是当存在更简单的替代方案时,您将看到一个复杂的解决方案。
在软件包安装期间添加注册表信息非常简单,它将在键下设置计算机的环境变量:
...到当前环境的 .dtsConfig 的路径。
You could include all of the configuration files in the install and then just point to the correct one through an environment variable. I know you're wanting to switch the configuration file based on the solution build configuration, but you'll be looking at a complex solution when a simpler alternative exists.
Its quite straight-forward to add registry information during the package install that will set the machine's environment variable under the key:
...to the path of the .dtsConfig for the current environment.