Today I downloaded FreeImage, and compiled the .Net wrapper project so that I can call the library from my C# project. Instead of referencing the wrapper project, I wanted to reference the assembly that the wrapper project generates.
Two problems to be solved:
- You can only register an assembly in the GAC if it has a strongname. To create it, either use the sn tool, or active the project setting to generate the key.
- Even after registering using gacutil, the assembly would not show up in the Add Reference dialog.
There are at least two solutions to the second problem:
- Create a registry key (HKLM or HKCU) to point to a directory which contains all the assemblies you need to reference (MSKB, VS reference
- Copy your assemblies to the PublicAssemblies directory located under the VS home directory (described here, replace with actual install directory)