Wednesday, September 24, 2008

Missing Assembly in GAC

I was getting this error when I try to run my App based on 3.5 framework – I found out that ADODB.dll and System.Core.dll were not registered in the Global Assembly Cache (GAC). For some reason, these two important DLLs did not register during the installation of .NET 3.5 framework.

Error Message:
Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.


So, what I did is I got a copy of the missing ADODB.DLL and pasted it in the new server. I installed the ADODB assembly and that fixed my problem.


For the System.Core, I just simply registered it using the DLL file located at C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 folder.

There are four ways to install an assembly into the global assembly cache:

1. Using the Global Assembly Cache tool (Gacutil.exe).

2. Using Microsoft Windows Installer 2.0.

3. Using a Windows shell extension provided by the Windows Software Development Kit (SDK) called the Assembly Cache Viewer (Shfusion.dll).

4. Using the .NET Framework Configuration Tool (Mscorcfg.msc).

My favorite procedure is using .NET Framework Configuration. It’s really easy.

For more information on how to install assembly into GAC, go to:

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


No comments: