Pages

Search This Blog

Sunday, September 2, 2007

The type 'xxx' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\xx.v7.2\xx.1063_xx\xx.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\xx.v7.2\xx.61_xx\xx.dll'

I got a error message "The type 'Infragistics.WebUI.Shared.Style' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Infragistics2.WebUI.Shared.v7.2\7.2.20072.1063__7dd5c3163f2cd0cb\Infragistics2.WebUI.Shared.v7.2.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\Infragistics2.WebUI.Shared.v7.2\7.2.20072.61__7dd5c3163f2cd0cb\Infragistics2.WebUI.Shared.v7.2.dll'" when try to use the bug fixed version for my project, Version 7.2.20072.1063.

To solve the problem:

First, we need to determine which version that i need to use. I need to use Version 7.2.20072.1063.
Second, we need to let out application which Version we need to use by changing web.config. Locate the <assemblies> tag (which should be under <configuration><system.web> <compilation>/<compilers>/<assemblies> ) Between the <assemblies> tag, you should enter something similar to:

<add assembly="AssemblyFileName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" />

<compilation debug="true">
<assemblies>
<add assembly="Infragistics2.WebUI.UltraWebTab.v7.2, Version=7.2.20072.1063, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
<add assembly="Infragistics2.WebUI.Shared.v7.2, Version=7.2.20072.1063, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
</assemblies>

</compilation>

Problem solved!





To know (GAC) Global Assembly Cache more:

Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache.


Go to Start -> Settings -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration

Expand the nodes and locate Assembly cache


We can add new object xxxx here.

To add manually:
Run the .NET command prompt (Start -> Programs -> Microsoft VS.NET -> VS.NET Tools -> VS.NET prompt) and start the gacutil.exe tool with -i parameter (install) and the name of the control, e.g.
gacutil.exe -i "C:\xxx\xxxx.dll"

To remove manually:
To remove xxxx from GAC
Please use the following command: gacutil.exe -u xxxx

We are able to see the different version for the object that we are trying to use. To know more about GAC, please check on
MSDN.

4 comments:

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Genial fill someone in on and this mail helped me alot in my college assignement. Thanks you for your information.

Anonymous said...

i'm new... promise to register round more oftentimes!

sam999 said...

what about vs2010?