tags:

views:

428

answers:

2

How do I define the Assembly folder for an Application correctly? I tried to use the registry Key: HKLM/SOFTWARE/Microsoft/.NET Framework/AssemblyFolders/App-Name and use the (Default) to set this to the path where the assemblies are located.

Some time ago this worked fine, but as I compiled a new Version and deployed it to a PC it wont work any more.

Do I have to add something else or missed any task?

+1  A: 

Those registry keys are only used by visual studio for loading the references list and for helping with hint paths. Applications built on .Net use assembly loading rules which check for assemblies in the GAC, the application's private bin path, or some other subfolder under the private bin path. The .Net runtime does not use the registry to resolve assemblies at runtime.

Joe Caffeine
A: 

If you are trying to add a reference on a machine that running 64-bit OS, than you need to add your App-Name under following registry key.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\AssemblyFolders\App-Name.

It's exactly like in your example, except that you need to add Wow6432Node key between SOFTWARE and Microsoft.

Vadim