开发者

How to reference an assembly in GAC

I'm trying to deploy an assembly in GAC, I did that successfully using Gacutil.exe utility.

Now, when I try to add a reference for it from Visual Studio - Add Reference - .N开发者_JAVA技巧et tab, I don't find it!!

Any help!


I had this problem, the GAC'ed dlls arent included in the references.

Check out this post I made: Add Reference in Framework 4 Application is not showing assemblies in GAC registered with GACUtil V 4

To make things easier, the link to the msdn article: http://msdn.microsoft.com/en-us/library/wkze6zky(VS.100).aspx

And to paraphrase, create an entry along the lines of the following: [HKEY_CURRENT_USER\SOFTWARE\Microsoft.NETFramework\v4.0.30319\AssemblyFoldersEx\MyMagicAssemblies] and then set the (Default) value to be a string with the value being the path you want searched. Look at your registry for examples of how this is set up (so the default value becomes: c:\dlls\

v4.0.30319 would be replaced with the framework version you want the dlls to show up against.

because your dlls are in the GAC it will use those as the actual reference and not the files you are showing in the reference list. Only if the version number of the dlls are different will it use your local version.


I've created a sexy visual studio extension that will help you to achieve your goal. Muse VSReferences will allow you to add a Global Assembly Cache reference to the project from Add GAC Reference menu item.

How to reference an assembly in GAC

Regards...

Muse Extensions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜