How to add a reference to C:\Windows\Microsoft.NET\assembly

817 views Asked by At

How can I reference a .NET assembly deployed in c:\windows\microsoft.net\assembly from Visual Studio IDE? If i do right click on References/Add Reference, it only shows the c:\windows\assembly content. How do I add a reference to new GAC path (c:\windows\microsoft.net\assembly)?

2

There are 2 answers

0
Carlos Russo On

It's working by adding a reference to: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\\

I don't know if it is the better way to do it but it seems to do the job.

For registering the DLL in another environment, I used the following sentence:

"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe" /i /f

Hope it helps.

0
Vinay Mishra On
  1. Go to the location via CMD C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools

  2. Type Gacutil -i {Path of the dll}

OR

Open visual studio commond promt and type Gacutil -i {Path of the dll}