|Home||Back to Index|
First, some background. For Continuous Integration, we’ve been using NAnt to exec MSBuild for awhile. To discover our NUnit tests, I set the build script up to exec MSBuild on each .sln file with the MSBuildEmitSolution environment variable set to 1 (on a short task - ValidateSolutionConfiguration). This converts the solution file to MSBuild XML. Immediately after that, I parse the emitted .proj file to find projects in a Tests solution folder. This seemed easier and safer than trying to parse the proprietary .sln file format. We’re specifying which tests to run in the solutions to make the build very easy for developers to maintain.
The problem started when we began moving projects to VS 2008. Sometimes MSBuild 3.5 would not generate the .proj file. This did not occur consistently. It did seem to generate a .cache file, though, which led me to this article:
Setting MSBuildUseNoSolutionCache to 1 along with MSBuildEmitSolution seems to have resolved the issue.
The article makes it sound like this is not a good feature to rely on. We may have to come up with a different scheme in the future.