如何使用的MSBuild我发布Asp

如何使用的MSBuild我发布Asp

本文介绍了如何使用的MSBuild我发布Asp.NET Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布本地使用楠和MSBuild的一个Asp.net MVC的Web应用程序。这是我使用我的恶性目标是什么;

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;

<target name="publish-artifacts-to-build">
    <msbuild project="my-solution.sln" target="Publish">
      <property name="Configuration" value="debug" />
      <property name="OutDir" value="builds\" />
      <arg line="/m:2 /tv:3.5" />
    </msbuild>
</target>

和我得到的是它作为响应;

and all I get is this as a response;

[msbuild]          Skipping unpublishable project.

是否有可能通过命令行用这种方式来发布Web应用程序?

Is it possible to publish web applications via the command line in this way?

推荐答案

发布你的目标是试图调用是键式部署,而不是为发布网站...这就是为什么你所得到的似乎离奇的消息。你想使用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.

来源

这篇关于如何使用的MSBuild我发布Asp.NET Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 02:02