且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用的MSBuild我发布Asp.NET Web应用程序?

更新时间:2022-11-06 16:11:47

发布你的目标是试图调用是键式部署,而不是为发布网站...这就是为什么你所得到的似乎离奇的消息。 你想使用AspNetCompiler任务,而不是MSBuild任务。请参阅http://msdn2.microsoft.com/en-us/library/ms164291.aspx有关此任务的详细信息。你的PublishDir将对应于任务的TARGETPATH​​属性。

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.

来源