Failed to add link to project assembly

I am having a problem adding a reference to a .NET assembly that I have built. Here's what I did.

  • I created a .NET assembly (testlib.dll).
  • I made sure it has a strong name (key file added).
  • I am creating a WiX setup project for this build.
  • I added Assembly = '. net 'and KeyPath =' yes' to the File property for the build.

Installation works fine. I can see testlib in the GAC (assembly C: \ Windows \).

I am creating a new .NET project and I am trying to add a reference to testlib, but I cannot see it in the .NET tab of the Add Reference dialog. How can I find it there?

0


source to share


2 answers


The assemblies that are on the .NET tab do not have a GAC ​​connection. To see the assemblies in the .NET tab, your installer will have to write to the following registry path: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft.NETFramework \ AssemblyFolders The entry should create a new key, usually the application name, and then set the default value for the path in which assemblies installed.



For example, if the application name is MyApp, it is set to: C: \ Program Files \ MyApp The full registry path would be HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft.NETFramework \ AssemblyFolders \ MyApp AND the default would be: C: \ Program Files \ MyApp

+1


source


We have created a tool to help you achieve your goal. Muse VSReferences allow you to add a reference to the global assembly cache in the project from the Add link GAC.

Respectfully...



s

0


source







All Articles