TFS Build 2015 - 使用 Visual Studio 2015 构建程序

TFS Build 2015 - Build procedure using Visual Studio 2015

我正在为我的 MVC 应用程序使用 TFS 2015 新构建功能进行自动部署。该解决方案还有一些 Web 服务项目以及其他项目。作为第一步,我尝试创建一个构建,我确定我们需要创建 Paramters.xml 文件以在此文件中配置配置变量。我相信,随后使用这个 Parameter.xml 我需要创建 setParameters_...xml 文件。

我的问题是:

1) 看来我必须手动创建 Parameter.xml 文件。我的假设正确吗?

2) 如何创建 setParameter...xml 文件?

请指导我完成这个过程或我可以作为参考的好资源。

根据Parameter.xmlsetParameters.xml的描述。您似乎想在 TFS2015 vNext Build 中创建 web 部署包

您可以直接使用以下 MSBuild 参数:

/p:OutDir=$(build.stagingDirectory) /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true 

有关示例,您可以查看以下博客:


您还可以在 Visual Studio Build 任务中启用网络部署包创建。只需传递以下 MS Build 参数:

MSBuild 参数:/p:DeployOnBuild=true;PublishProfile=<name of your profile>

必须在“变量”选项卡页面上配置 DeploymentConfiguration。它必须是发布配置文件的名称(pubxml 文件的文件名)。如果文件名是 Build.pubxml 发布配置文件是 Build.

例如:

/p:DeployOnBuild=True /p:PublishProfile=Build

示例可以看这个博客: