Visual Studio .NET Assembly loading
We've been writing a lot of Visual Studio .NET add-ins using managed code (in addition to the VSIP stuff, that's written in VC++).
The add-ins are built as assemblies that are loaded by VS.NET using COM-interop. The issue is that when you want to load a new assembly from the add-in, the devenv.exe process (which loads the add-in) looks for the assembly in:
- the GAC
- the \\Program Files\\Microsoft Visual Studio .NET\\Common7\\IDE folder
- the \\Program Files\\Microsoft Visual Studio .NET\\Common7\\IDE\\PrivateAssemblies folder
- the \\Program Files\\Microsoft Visual Studio .NET\\Common7\\IDE\\PublicAssemblies folder
- the path specified by the DEVPATH variable.
So, it looks for the assembly in every place but in the directory where the original assembly was loaded, which is the way the CLR usually loads assemblies. This means that if you need an additional assembly, you have to install it in one of those places. It's really awkward and annoying.