📜 ⬆️ ⬇️

How to add a Silverlight build to the GAC

Recently, I was puzzled by the question of adding a Silverlight assembly to the GAC. This is necessary in order to be able to refer to an assembly from several projects and not to transfer this assembly each time with the project.

As you know, the Silverlight runtime is not the same as the .NET Framework runtime and simply adding an assembly to the global repository with gacutil has no effect. But on the other hand, after installing Silverlight, we can see in the list of available assemblies of the “Add reference” dialog in Visual Studio the set of standard assemblies that make up Sliverlight.

As it turned out, in order to make it possible to refer to an assembly from any projects through the “Add reference” dialog, you need to add a special key to the registry:
')
1.Open the HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Microsoft SDKs \ Silverlight \ v4.0 \ AssemblyFoldersEx key
if you have a 32-bit OS, then the “Wow6432Node” component should be excluded
2. In this location, create a key with some name (for example, the name of the project).
3. Add a default value containing the path to the assemblies on the hard disk.



Now when adding a link to a project, in the “Add reference” dialog all assemblies from the specified folder will be available.



The solution to the problem is not very difficult, but at the right moment, it happens that it is very difficult to find it. I wish you success!

Source: https://habr.com/ru/post/97547/


All Articles