MSBuild 和 BizTalk

发布于 2024-12-27 09:31:28 字数 222 浏览 2 评论 0原文

是否可以为 BizTalk 项目指定(或覆盖)Deploy ApplicationName、数据库服务器和数据库名称?如果是这样,怎么办?

不幸的是,此数据存储在 btproj.user 文件而不是 .btproj 文件中,并且我的客户不想将 btproj.user 文件签入源代码管理系统。

(仅供参考 - 我们正在使用 CodePlex 的 BizTalk Build Generator。)

Is it possible to specify (or override) the Deploy ApplicationName, database server, and database name for BizTalk projects? If so, how?

Unfortunately this data is stored in the btproj.user file instead of the .btproj file, and my client doesn't want to check the btproj.user files into the source control system.

(FYI - we are using BizTalk Build Generator from CodePlex.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国际总奸 2025-01-03 09:31:28

我刚刚查看了 CodePlex 上的源代码。当我正确理解所有内容时,他们正在生成

%AppName%.Custom.targets
%AppName%.Custom.properties

文件。在属性文件中列出了 BTS 数据库连接的一些属性。

<BizTalkDatabaseServerName>.</BizTalkDatabaseServerName>
<BizTalkManagementDatabaseName>BizTalkMgmtDB</BizTalkManagementDatabaseName>
<BizTalkManagementDatabaseConnectionString>
 server=$(BizTalkDatabaseServerName);
 database=$(BizTalkManagementDatabaseName);
 integrated security=sspi;
</BizTalkManagementDatabaseConnectionString>
<PipelineComponentsFolderPath>C:\Program Files\Microsoft BizTalk Server 2010\Pipeline Components</PipelineComponentsFolderPath>

您可以通过使用命令行或使用属性开关在 VS 或 TeamBuild 中添加其他 msbuild 参数来轻松覆盖这些属性值。

msbuild.exe MyBizTalkProject.proj /p:BizTalkDatabaseServerName=SqlCluster 

该项目的开发人员应重写默认的 MSBuild.Custom。属性文件看起来像这样

<BizTalkDatabaseServerName Condition="'$(BizTalkDatabaseServerName)'==''">.</BizTalkDatabaseServerName>

通过使用这种方法“.”仅当未给出参数值时才会使用标识符(对于本地 SQL Server)。因为在当前的实现中,属性的定义可以!覆盖从命令行传递的值。所以要注意这一点。

I've just reviewed the source on CodePlex. When I understood everything correctly they are generating

%AppName%.Custom.targets
%AppName%.Custom.properties

files. Within the properties file some properties are listed for BTS Database Connectivity

<BizTalkDatabaseServerName>.</BizTalkDatabaseServerName>
<BizTalkManagementDatabaseName>BizTalkMgmtDB</BizTalkManagementDatabaseName>
<BizTalkManagementDatabaseConnectionString>
 server=$(BizTalkDatabaseServerName);
 database=$(BizTalkManagementDatabaseName);
 integrated security=sspi;
</BizTalkManagementDatabaseConnectionString>
<PipelineComponentsFolderPath>C:\Program Files\Microsoft BizTalk Server 2010\Pipeline Components</PipelineComponentsFolderPath>

You could easily override these Property values by using the commandline or by adding additional msbuild arguments in VS or TeamBuild using the Property switch

msbuild.exe MyBizTalkProject.proj /p:BizTalkDatabaseServerName=SqlCluster 

The developer of this project should rewrite the default MSBuild.Custom.properties file to look like this

<BizTalkDatabaseServerName Condition="'$(BizTalkDatabaseServerName)'==''">.</BizTalkDatabaseServerName>

By using this approach the "." identifier (for local SQL Server) will only be used when no value for the parameter is given. Because with the current implementation the definition of the Property could! override you value passed from the command line. So be aware of that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文