SSIS 部署:Dev Stage Live AppSettings [英] SSIS Deployment: Dev Stage Live AppSettings

查看:29
本文介绍了SSIS 部署:Dev Stage Live AppSettings的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主要问题是:如何将 appSettings.Config 文件与特定构建(开发、阶段、实时)合并? 我的 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?

推荐答案

您可以在安装中包含所有配置文件,然后通过环境变量指向正确的配置文件.我知道您想根据解决方案构建配置切换配置文件,但是当存在更简单的替代方案时,您将看到一个复杂的解决方案.

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:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\MyVariable

...到当前环境的 .dtsConfig 的路径.

...to the path of the .dtsConfig for the current environment.

这篇关于SSIS 部署:Dev Stage Live AppSettings的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆