This project is read-only.

Putting MSBuild Extension pack into my codebase - is this a good idea or not?

Sep 4, 2012 at 5:09 PM


I just read which suggests that MSBuild Extension pack should be installed wherever I am going to use it.

That makes sense however it does mean that MSBuild Extension pack is now a pre-requisite for anywhere where I am going to compile my codebase. Personally I think it would be much easier if I just bundled MSBuild Extension Pack along with my codebase - that way I know that it will always be present. Does anyone else do that?

The one thing that bothers me about doing this is that the docs say:

If you do not install the MSBuild Extension Pack to the default installation path, you will need to alter the MSBuild.ExtensionPack.tasks file as it refers to $(MSBuildExtensionsPath) which always refers to %PROGRAMFILES%.

which does worry me sightly. Am I worrying about nothing?


Sep 4, 2012 at 11:22 PM

It's perfectly valid to take the binaries rather than the MSI and that's partly why each release provides them as a separate package in the download.

Right now you will need to change the tasks file as indicated. I think you can just remove the whole propertygroup at the top of the file

I'm going to look at removing the need to do this in the September release. I also need to update docs you referenced. The September release will be compatible with StyleCop 4.7, not 4.6.....



Sep 5, 2012 at 9:41 AM

cool, thank you Mike.

Oct 15, 2012 at 11:34 PM
Edited Oct 15, 2012 at 11:35 PM

I've wondered, why not have the .tasks file use $(MSBuildThisFileDirectory) by default? That way it can be dumped into the MSBuild directory, or included in a separate folder, such as a sub-directory of your codebase.  

I include ExtensionPack in the codebase for portability, as I want to minimize the number of external dependencies for doing a build, and I ended up creating my own .tasks file that uses $(MSBuildThisFileDirectory) to find MSBuild.ExtensionPack.dll.

Only minor issue: MSBuildThisFileDirectory was introduced with MSbuild 4.0.