How do I publish a Asp.NET web application using MSBuild?

后端 未结 2 631
一整个雨季
一整个雨季 2020-12-05 18:56

I am trying to publish an Asp.net MVC web application locally using the NAnt and MSBuild. This is what I am using for my NAnt target;



        
相关标签:
2条回答
  • 2020-12-05 19:23

    The "Publish" target you are trying to invoke is for "OneClick" deployment, not for publishing a website... This is why you are getting the seemingly bizarre message. You would want to use the AspNetCompiler task, rather than the MSBuild task. See http://msdn2.microsoft.com/en-us/library/ms164291.aspx for more info on this task. Your "PublishDir" would correspond to the TargetPath property of the task.

    Source

    0 讨论(0)
  • 2020-12-05 19:28

    I came up with such solution, works great for me:

    msbuild /t:ResolveReferences;_WPPCopyWebApplication /p:BuildingProject=true;OutDir=C:\Temp\buidl\ Test.csproj
    

    Secret sauce is _WPPCopyWebApplication target.

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