Can TeamCity publish a Web project using the sln2008 build runner?
I've written a pretty long blog post on this very topic that may interest you:
basically:
- install web deployment projects
- add web deployment project to your solution
- setup the solution configuration manager to have a "Deployment" build configuration
- get team city to use this build switch when running the build
- have a beer and wonder in glory at your automagical awesomenesss
Have you tried a Web Deployment Project (WDP)? I have multiple Web Application Projects (WAP) with associated WDPs that work great with TeamCity for deployment scenarios.
I use the sln2008 runner to build my solution (containing both the WAP and the WDP). I've modified the WDP project file (an MSBuild script) to copy the output to a network share:
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Deploy' "> <!-- copy WDP output to \\build02\wwwroot\Belden.Web.Intranet\ --> <ItemGroup> <MySourceFiles Include="$(OutputPath)**\*.*" /> </ItemGroup> <Copy SourceFiles="@(MySourceFiles)" DestinationFiles="@(MySourceFiles->'\\build02\wwwroot\Belden.Web.Intranet\$(ProjectDir)%(RecursiveDir)%(Filename)%(Extension)')" /></Target>
I haven't tried this with MVC/WDP, but I imagine it would work the same ...
I believe you can: Publish sln. Have a look at the targets. Hopefully it will lead you in the right direction.