Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello friends,

I am using MySql.Data.dll, version = 5.0.8.1.

Actually whenever I work on VWD 2010, always need to make a reference of this dll in my project or web application in bin folder.

For this I installed this dll in Global Assembly Cache using gacutil.exe
So that I don't need to make a reference it in every web application because once it installed I think I can directly use like using MySql.Data.MySqlClient;

But this is not happening...
and when I check on command prompt with following command.
i.e.

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>gacutil /l MySql.Data
Microsoft (R) .NET Global Assembly Cache Utility.  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

The Global Assembly Cache contains the following assemblies:
  MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d,
 processorArchitecture=MSIL

Number of items = 1

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>

Please guide me how can i utilize GAC in my application or I am missing any step to use.

Or Please tell me the right way to use it.


Thanks.
Posted
Updated 19-Sep-11 19:47pm
v3
Comments
Prerak Patel 20-Sep-11 1:47am    
Added pre tag.
johannesnestler 20-Sep-11 3:20am    
but you added a reference to your project, did you?
Manish Kumar Namdev 20-Sep-11 5:44am    
No I didn't add a reference in my project. Because when if it is in GAC
then it should work like other dlls using System.XYZ;

And If still I need to make a reference then what's the need to put dll in GAC.

I'm very confused

1 solution

GAC is for storing different versions of DLL side by side so applications can use what they are built for without conflicts.

You must add a reference to the DLL needed in your project in any case.

Unfortunately Visual Studio cannot add from the GAC and you must have a copy of the DLL outside of GAC for it to be referenced ie in a folder.
 
Share this answer
 
Comments
Manish Kumar Namdev 20-Sep-11 5:40am    
Thanks to reply..
But if Visual Studio cannot add from GAC then what's the use of GAC.

Referencing a dll I was doing the same earlier and it means whether to put dll in GAC or not I always need to make a reference of dll.
Mehdi Gholam 20-Sep-11 6:02am    
GAC is mainly used for deployment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900