开发者

Problem regarding DLL installation in GAC

开发者 https://www.devze.com 2023-01-07 20:13 出处:网络
I have installed a DLL开发者_JS百科 in GAC it is isnstalled properly but it is not refelcted in reference. is there any problem?Try this :

I have installed a DLL开发者_JS百科 in GAC it is isnstalled properly but it is not refelcted in reference. is there any problem?


Try this :

one Article for you : How to use a DLL from the GAC

Check this : http://www.velocityreviews.com/forums/t68885-how-to-use-dlls-from-gac-in-asp-net-apps.html

Solution 1 :

you can either choose to add a reference to the dll and then use "using namespace" for classes

Solution 2:

Add @Assembly="assembly.dll"


Only encrypted assemblies can be picked up from the GAC. Is your assembly encrypted (The public key in the full name should be a long string if it's encrypted, null otherwise)


Look at this MS article: How to display an assembly in the "Add Reference" dialog box

Quote:

To display your assembly in the Add Reference dialog box, you can add a registry key, such as the following, which points to the location of the assembly [HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies" where MyAssemblies is the name of the folder in which the assemblies reside.

NOTE: You can create the this registry entry under the HKEY_LOCAL_MACHINE hive. This will change the setting for all of the users on the system. If you create this registry entry under HKEY_CURRENT_USER, this entry will affect the setting for only the current user.


That's By Design (that's where there are reference assemblies even for the .net assemblies in the GAC)

http://msdn.microsoft.com/en-us/library/ez524kew.aspx

Use the Add Reference dialog box to add references to components at design time.

You can use the Add Reference dialog box to browse to assemblies not listed. You cannot add references from the Global Assembly Cache (GAC), as it is strictly part of the run-time environment.

You can manually edit the proj file (copy-paste one of the existing GAC'd things, like System, and change the name) or put a 'reference' version somewhere else and use that (in your source tree, for instance)

0

精彩评论

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