Msbuild 发布和WebPublish目标之间有什么区别?
我们有一个构建配置运行程序类型Visual Studio.sln设置,用于从具有发布配置文件的csproj读取(/p:PublishProfile=%env.configuration%.pubxml),以创建一个Web部署包,然后在另一个构建步骤中使用该包使用MSDeploy进行部署 在TeamCity上,目标选项说明Msbuild 发布和WebPublish目标之间有什么区别?,msbuild,teamcity,Msbuild,Teamcity,我们有一个构建配置运行程序类型Visual Studio.sln设置,用于从具有发布配置文件的csproj读取(/p:PublishProfile=%env.configuration%.pubxml),以创建一个Web部署包,然后在另一个构建步骤中使用该包使用MSDeploy进行部署 在TeamCity上,目标选项说明 Enter targets separated by space or semicolon. Build, Rebuild, Clean, Publish targets ar
Enter targets separated by space or semicolon. Build, Rebuild, Clean, Publish targets are supported by default
看看其他一些StackOverflow线程,它提到了使用WebPublish作为目标是可行的,但没有说明它为什么有效
我不确定“发布”和“WebPublish”之间的区别是什么。Visual Studio目标使用引擎盖下的WebDeploy/WebPublish进行发布。Visual Studio目标使用引擎盖下的WebDeploy/WebPublish进行发布。具体来说,如果传递了
DeployTarget=WebPublish
或传递了PublishProfile
的值,则Publish
将调用WebPublish
。请参见Microsoft.Web.Publishing.targets:137
。特别是,如果您传递了DeployTarget=WebPublish
或传递了PublishProfile
的值,则Publish
将调用WebPublish
。请参见Microsoft.Web.Publishing.targets:137
。