Asp – How to build ASP.NET web site the way VS2008 does using msbuild

asp.netmsbuild

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?

Best Answer

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