Archives

Archives / 2008 / July
  • C:\Program Files\Reference Assemblies for assemblies to reference in your code

    I just stumbles across a "new" concept of Microsoft. In the C:\Program Files\Reference Assemblies folder Microsoft installs assemblies for products that can be referenced from your code. Instead of referencing assemblies directly from the GAC or copying an assembly from an installation folder or the GAC to your project for reference, you can now reference the assemblies in this folder.

    We have a similar approach in our Macaw Solutions Factory where we have a _SharedAssemblies folder to keep track of all external assemblies to reference. We prefer to keep the assemblies with the source that is checked into source control, because otherwise it is possible that a build server does not contain the expected assemblies when compiling a checked-out solution and can't successfully compile the solution.

    On the MsBuild team blog you can read more about this feature that happened to be with us since the .Net 3.0 framework:

    http://blogs.msdn.com/msbuild/archive/2007/04/12/new-reference-assemblies-location.aspx

    Also other applications like PowerShell keep their assemblies to reference in this location.