Project Validator

As an idea that compliments the previous validator I built, this msbuild task will search for all the projects in a given path and check that they are all building to the correct path.

Download source

To use just define two properties: SearchPath, which is the parent folder to start looking in. It will search all subfolders as well by default. And BuildFolder, which is the desired target for building to.

All it does is very simple substring matching to check that it is valid.

For example, if I build a project to ..\bin\Debug and ..\bin\Release and the specify my build folder is ..\bin then both paths are valid. But if one of the build targets was set to something like ..\foo then it would be invalid

Again, this validator could be extended to check other parts of the project files.

Leave a Reply