4

We use Nant and devenv.com to build all our assemblies including the website project. Then we would use aspnet_compiler.exe to compile the published website.

Is this the correct way to do it? Historically, we always used the aspnet_compiler with plain vanilla website folders, but I'm not sure if this is really the correct tool for publishing websites that are part of a website project. It sort of feels wrong to have to do this as a 2 stage process using 2 different tools.

jaffa
  • 26,770
  • 50
  • 178
  • 289

1 Answers1

3

Using aspnet_compiler.exe is one of many ways to publish a website:
http://forums.asp.net/t/1544792.aspx#_What_is_the1

Since a web project can be compiled using msbuild (instead of devenv.com), you can also create a custom msbuild target to publish your files:
http://www.digitallycreated.net/Blog/59/locally-publishing-a-vs2010-asp.net-web-application-using-msbuild

In this way, you can combine the compiling and publishing of the web site in one step.

Rami A.
  • 10,302
  • 4
  • 44
  • 87
  • Great, I thought this might be the case. – jaffa Jan 03 '12 at 16:40
  • I recently read some information about using the msbuild property DeployOnBuild. So for example, on the command line you would specify "/p:DeployOnBuild=true". But it seems that this only creates a deployment package as opposed to publishing, but they may be related requirements. Here is a link to a deployment faq: http://msdn.microsoft.com/en-us/library/ee942158.aspx – Rami A. Jan 03 '12 at 20:39