Search code examples
.netvisual-studiosilverlightvisual-studio-2013portable-class-library

Registering a Portable PCL assembly in the Visual Studio Add References Dialog


In Visual Studio, the assemblies listed in the Add References dialog are registered by adding a Registry key to HKLM\SOFTWARE\Microsoft\.NETFramework\{VersionMinimum}\AssemblyFoldersEx\.

VersionMinimum is the lowest .NET Framework version that applies and is a value like v2.0.50727 or v4.5.

The library I am working on has versions compiled for various versions of the .NET framework including Silverlight and the Portable framework (PCL). I have the assemblies for all of the standard frameworks registered, but I have not been able to register the Silverlight or PCL assemblies.

When I look at the assemblies that are presented in Visual Studio 2013 for a PCL project, it looks like everything is listed and you just need to know what works. For a Silverlight project, there is only a limited list of Extension assemblies and I cannot find them listed in the registry.

What registry keys/{VersionMininim} do I use for Silverlight and PCL assemblies? Based on my previous paragraph, is it even supported?


Solution

  • I've found the information for Silverlight on http://blog.arvixe.com/how-to-add-silverlight-assembly-to-add-reference-visual-studio-dialog/

    The Silverlight registry keys are;

    32-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v4.0\AssemblyFoldersEx
    64-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Silverlight\v4.0\AssemblyFoldersEx