How can I publish site from command line with some publish profile?

前端 未结 2 904
时光取名叫无心
时光取名叫无心 2020-12-13 11:03

Something like

msbuild /t:publish [use PublishProfileName] someproject.csproj

2条回答
  •  情歌与酒
    2020-12-13 11:20

    msbuild MyProject.csproj /t:PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Release;_PackageTempDir=C:\temp\somelocation;AutoParameterizationWebConfigConnectionStrings=false
    

    See MSBuild 2010 - how to publish web app to a specific location (nant)?

    For Visual Studio 2012 you can use

    msbuild MySolution.sln /p:DeployOnBuild=true;PublishProfile=Production;Password=foo
    

    See ASP.NET Web Deployment using Visual Studio: Command Line Deployment

提交回复
热议问题