Publish MVC v1 C# application through Cruise Contr

2019-05-26 05:41发布

I am attempting to publish a 3.5 MVC website on my build server through cruise control.

Having looked around on the net it appears you need to wrap the ASP Net Compiler. I was hoping that this task can be called through MSBuild.

Any ideas on how this is done?

2条回答
Melony?
2楼-- · 2019-05-26 05:54

This article specifies how to specify a precompiled website. http://msdn.microsoft.com/en-us/library/ms164291.aspx

Remember to also set the tag to 'true' in your MVC csproj file.

查看更多
beautiful°
3楼-- · 2019-05-26 06:07

This is fairly simple to accomplish with an MSBUILD file.

Here's a sample target the will rebuild your entire solution and will deploy your MVC web application to your desired output directory

<Target Name="Deploy">
    <MSBuild Projects="Solution.sln" Targets="Rebuild" />

    <MSBuild Projects="MVCWebProject\MVCWeb.csproj"
        Targets="ResolveReferences;_CopyWebApplication"
        Properties="OutDir=$(OutputFolder)\bin\;WebProjectOutputDir=$(OutputFolder)" />
</Target>

In your cc.net configuration, simply pass /p option to the MSBUILD task to specify the output directory for your web application as follows:

/p:OutputFolder=c:\Your\Output\Path

查看更多
登录 后发表回答