Full list of /P MSDeploy arguments for MSBuild from TeamCity

橙三吉。 提交于 2019-12-03 05:34:43

Firstly, the short answer is you can't find the complete list. MSBuild does not have a complete list of parameters you can chose from since you can send any parameter you like. It is a means of communication between the caller of MSBuild and the author of the MSBuild build script (a vs sln or csproj file for instance).

If the build script use the parameter it is used otherwise it is ignored.

So this is a valid call to msbuild:

msbuild /p:<anything>=<anything>

Secondly, you shouldn't send parameters to msbuild from teamcity using the /p: command options. Instead, set configuration or system properties in your teamcity build configuration. They will be passed to msbuild automatically as parameters.

Here are the parameters used by Visual Studio Team Services when creating an ASP.NET (Preview) build definition:

/p:DeployOnBuild=true 
/p:WebPublishMethod=Package 
/p:PackageAsSingleFile=true 
/p:SkipInvalidConfigurations=true 
/p:PackageLocation="$(build.artifactstagingdirectory)\\"

One may also extrapolate from the <PropertyGroup /> blocks defined in these examples:

https://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx

From this example:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>Package</WebPublishMethod>
    <LaunchASiteUrlAfterPublish>False</LaunchASiteUrlAfterPublish>
    <SiteUrlToLaunchAfterPublish />
    <MSDeployServiceURL />
    <DeployIisAppPath />
    <RemoteSitePhysicalPath />
    <AllowUntrustedCertificate>False</AllowUntrustedCertificate>
    <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
    <DeployAsIisApp>True</DeployAsIisApp>
    <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
    <UserName />
    <SavePWD>True</SavePWD>
    <PublishDatabaseSettings>
      <!— this section omitted to keep the example short -->
    </PublishDatabaseSettings>
  </PropertyGroup>
</Project>

You could derive the following list:

  • WebPublishMethod
  • LaunchASiteUrlAfterPublish
  • SiteUrlToLaunchAfterPublish
  • MSDeployServiceURL
  • DeployIisAppPath
  • RemoteSitePhysicalPath
  • AllowUntrustedCertificate
  • SkipExtraFilesOnServer
  • DeployAsIisApp
  • MSDeployPublishMethod
  • UserName
  • SavePWD
  • PublishDatabaseSettings
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!