views:

187

answers:

2

I am getting following error for log4Net in Asp.Net 2.0 website.

Compiler Error Message: CS0433: The type 'log4net.Config.XmlConfigurator' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\caps_2.25\bc79a253\fd331fcd\assembly\dl3\6113a1ef\008a4b7c_09b0ca01\log4net.DLL' and 'c:\WINDOWS\assembly\GAC_MSIL\log4net\1.2.10.0__1b44e1d426115821\log4net.dll'

How to make Asp.Net to use the local log4Net.dll instead of the one from GAC?

+1  A: 

Check out the responses to this very similar question.

A summary of the winning answer:

"If it (any DLL) has the same version number as the referenced DLL, the GAC gets used.

If you increment the version number, rebuild the website referencing the new version number, put the new version in the /bin directory, then that DLL will be used.

If you do not want to change the version number, you're pretty much out of luck. "

DOK
+1  A: 

I would delete the one in the temporary files for sure. Then you can decide if you want to remove the one from the GAC probably just by running the installer again and just uninstall it. I would copy and paste it first into your bin directory if you want to use the local one.

rockinthesixstring