Publish ClickOnce from the command line

后端 未结 1 1315
旧巷少年郎
旧巷少年郎 2021-02-06 16:53

Is there a way to have Visual Studio 2008 execute the \"Publish Now\" button from the command line?

I\'ve seen posts that suggest to use msbuild /targe

1条回答
  •  忘了有多久
    2021-02-06 17:27

    To increment build numbers, I am using MSBuild Extension pack inside my .csproj file as follows:

    
      
      
      
      
        
      
      
    
    

    This way, anytime the configuration is set to Release-VersionIncrement, the version number is changed. When this is done, I can use the following MSBuild command to publish it:

    msbuild c:\projects\MyProject.csproj /t:ResolveReferences;_CopyWebApplication /p:Configuration=Release;BuildingProject=true;WebProjectOutputDir=c:\inetpub\wwwroot\OutputProject\MyProjectOutput;OutDir=c:\inetpub\wwwroot\OutputProject\MyProjectOutput

    Note that this is for an ASP.NET 3.5 web application.

    0 讨论(0)
提交回复
热议问题