After upgrading to VS2010 we have a few .dbproj files that are causing issues in our CI builds. They do nothing except just store SQL files anyway, so I'd like to just ignore them. I'm running CruiseControl.NET and building my solution with devenv.com. Is there some way for me to tell the build that I want to ignore these projects, or all .dbproj projects?
Asked
Active
Viewed 505 times
2 Answers
3
One way to do it is to create a new solution configuration in Visual Studio. Go to the Debug menu and then Configuration Manager. Create a new configuration and then exclude your .dbproj projects.
Then use that configuration name in the command line of devenv.com instead of 'Debug' or 'Release'

Mike Two
- 44,935
- 9
- 80
- 96
-
INHO, maintaining another configuration just for build is a bit too expansive. – Hertzel Guinness Jun 11 '11 at 07:48
-
@Hertzel The maintenance is minimal. We do this in a few solutions on our current project. By default items added to one configuration are added to all. So there is no real work other than initial configuration. – Mike Two Jun 11 '11 at 14:53
-
two Good point, though i still favor the exclude from build feature. – Hertzel Guinness Jun 12 '11 at 08:29
0
- Since its a just a files container project, you could just exclude it from build in
Debug
andRelease
- Use msbuild instead of devenv and it will support the 'excluded from build' feature (i think devenv doesn't)
An (somewhat) alternative would be to switch the project into a class library (which will actually will build nothing...)
An example MSBUILD task would be:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>project_solution_path</workingDirectory>
<projectFile>project_solution_file</projectFile>
<buildArgs>/p:Configuration=Debug /p:VCBuildAdditionalOptions="/useenv" /v:diag /t:rebuild</buildArgs>
<timeout>300</timeout>
</msbuild>
HTH

Hertzel Guinness
- 5,912
- 3
- 38
- 43