开发者

Publishing an ASP.NET Website using buildpublisher

I am using the Cruise Control BuildPublisher task to publish a 2005 ASP.NET website. The Website has no warnings and if I run the Publish WebSite from within the IDE it works fine.

When I publish through Cruise Control however it only publishes the bin folder and the PrecompiledApp.config. 开发者_如何学JAVAAll ASPX files are excluded.

I have tried this before on a previous project with no issue.


In general, I have found that putting as much logic as possible into an MSBuild (or nAnt if that's your thing) file and as little as possible into the CCNet file is the way to go.

If this approach works for your environment, you can create an MSBuild target that puts the files you need into a group, like this:

<ItemGroup>
    <DeployFiles Include = "*.aspx"/>
    etc.
</ItemGroup>

And then add a copy task to deploy your files to the appropriate place:

<Copy SourceFiles="@(DeployFiles)" DestinationFolder="\\someserver\builds\$(CCNetLabel)">

Very important: If you have your compilation task in the same MSBuild file, you will want to make this copying business a separate call to MSBuild. This is because the DeployFiles ItemGroup will be evaluated right away. Any new files that match the DeployFiles filters will not be included when it's time to deploy the build. Very annoying.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜