Friday, December 01, 2006

How to: Reference GAC'd assembly from VS2005

The other day I was trying to add a reference to an assembly that was in the Global Assembly Cache (GAC) from Visual Studio 2005. I couldn't find the assembly listed in the Add Reference dialog. I noticed that none of the GAC'd assemblies were showing up. So after a little research I found a way to add the reference. Go to the Browse tab and type the file path with assembly version and token in the File name: textbox. As an example, if you want to add a reference to the PIA interop assembly for Word 2003, you type:

C:Windows\assembly\GAC\Microsoft.Office.Interop.Word11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll

1 Comments:

Anonymous Anonymous said...

Were you perhaps trying to reference an assembly build in 1.1 and now invisuble in the "add reference .NET" tab in VS2005? THat is my problem. VS2005 only shows 2.0 assemblies. Older 1.1 assemblies I previously GAC'ed are not shown (annoying.)

9:43 a.m.  

Post a Comment

<< Home