tags:

views:

549

answers:

2

Hello, I would like to publish a website using msbuild. Since I have a website and not a web application project, how can I go about this since I do not have the .csproj file and msbuild expects a project file as input or you can execute it in a folder with a project file. My solution file contains multiple websites that do not have .csproj files ?

+1  A: 

Use the Aspnet compiler task.

http://msdn.microsoft.com/en-us/library/ms164291.aspx

It works on asp.net websites. Just copy (or output directly) to where you need it deployed.

Min
+3  A: 

I would create Web Deployment Projects for each website, MSBuild can read the .wdproj file (it actually is an MSBuild script).

VS2008 Web Deployment Project download

This is a Visual Studio template that accomplishes exactly what you need.

Internally this script using the ASP.NET Compiler task, as well as some copying of files depending on project settings.

Adam