开发者

CruiseControl.NET: Ignore DB projects in a build

开发者 https://www.devze.com 2023-03-10 17:24 出处:网络
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 Cruise

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开发者_如何学Python tell the build that I want to ignore these projects, or all .dbproj projects?


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'


  • Since its a just a files container project, you could just exclude it from build in Debug and Release
  • 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号