views:

351

answers:

1

With web sites in VS2008 (the ones without .csproj files), a build does a kind of validation where the site is 'compiled' to nowhere, and web site dependencies are copied into the web site's Bin directory.

I want to do this exact process but at the command-line using msbuild. That is, I want an msbuild task that my msbuild target can execute that validates the web site, reporting any compile errors and copying dependencies to Bin, but does not require an IIS virtual directory, and does not precompile all the aspx and other files to DLLs in the Bin directory.

The AspNetCompiler task appears to do a full precompile, creating a directory full of compiled aspx pages. And it requires an IIS virtual directory. So I don't think this task will work for me.

How can this be done?

+2  A: 

Have you checked VS Web Deployment Project . Also, take a look at aspnet_merge tool since you are concerned

The AspNetCompiler task appears to do a full precompile, creating a directory full of compiled aspx pages.

And I don't think aspnet_compile requires an IIS virtual directory

J.W.
I may be reading that page wrong, but it looks like that's a "take your built web site and deploy it" tool, whereas I need to build it in place, and just minimally the way VS2008 does. Thanks though.
Andrew Arnott
The tool actually does the build for you. I am not sure what do you mean "in place", even VS2008 will compile your page into "deployable" folder.
J.W.
Take a look at this link : http://learn.iis.net/page.aspx/346/web-deployment-tool/
J.W.
+1 for the various good ideas... although aspnet_merge is not what I'm looking for. I don't want any compiled dlls at all. I just want dependency dlls (assembly references) copied into Bin and that's it.
Andrew Arnott
Then why not run msbuild against your solution file or your project file?
J.W.
heh heh. You know, while we were discussing these other ideas, I was wondering the same thing. I don't have a project file for the web site, but I do have a sln file, and apparently the target to build is named after the web site. Add another answer and I'll accept it.
Andrew Arnott