RSS

Monthly Archives: January 2012

How to add custom assembly folder to the ‘Add References’ dialog in Visual Studio 2010

There are numerous pages devoted to this issue, most saying different things about where the registry key goes, and very little about the path format.

This worked for me after 10 minutes of frustration trying out different locations:

Open regedit by typing ‘regedit’ in the ‘Search Programs and Files’ field in the start menu

Expand HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx

Right click on AssemblyFoldersEx, select ‘New -> Key’

Call the new key ‘MyAssemblies’ or whatever you want

In the right hand panel, double click on the ‘Default’ item

Enter your path as follows:

C:\Path\To\My\Assemblies\Folder\

(ie don’t use ‘\\’ to as a separator and add a trailing \)

On 64 bit machines, it’s slightly different. The location in the registry is:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\
AssemblyFoldersEx\

So add a new key there called ‘MyAssemblies’ or whatever, then change it’s default value to the path.

Hope this saves a bit of time for someone out there.

 
1 Comment

Posted by on January 19, 2012 in dotnet, visual studio