I have a c# web application project in Visual Studio 2008 that I want to precompile for deployment. After looking at various options, it seems all of them have some issues – perhaps someone could give their thoughts on this:
The project is under source control and also contains a lot of files that are excluded from project.
Web Deployment Projects does not work. If I try to use a wdp to compile, aspnet_compiler.exe will also try to compile all the excluded files. I don't want to maintain an exclude list in the msbuild script.
Is there a way to tell msbuild only to use the files/items that are specified in the csproj file, copy these to an intermediate folder and have aspnet_complier.exe build from this copy that does not contain any of the excluded files?
The website has depencies to 3 other csproj files.
Thanks!
Best Answer
You can make msbuild tasks to hide (attrib +h) or delete unwanted files...
Or you can use a solution file (.sln) and have your csproj there and build that.
Ps. Not exactly your problem, but this might help (it is for web sites, not for web applications):
Unable to publish using msbuild or aspnet_compiler using cc.net