Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'You must add a reference to Microsoft.Practices.EnterpriseLibrary.Common' even though assembly is in the GAC

I'm trying to compile an application for which I have the solution and can't get past:

'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

So I added the assembly to the GAC:

enter image description here

After some research I opened up visual studio with the Fusion Assembly Binding Viewer running, which seemed to create a lot of logs but none that related to this exact version of the assembly (however 4.1.0.0 is in there).

I can't simply add -> reference as VS tells me that a reference with the same name already exists.

What other avenues should I explore?

like image 937
m.edmondson Avatar asked Nov 13 '22 14:11

m.edmondson


1 Answers

Have you tried to Alias the assembly also if you are using .net 4.0 you would have to have an entry in the .config file for example that shows the old assembly name referencing the new assembly name. Several other things to keep in mind .. if the .DLL is in the GAC and you don't have a copy of that assembly in the bin folder, this could cause an issue..

Is this local referencing or is the code on a remote machine ..? if it's a remote machine.. why not add that specific assembly to the GAC.. notice the versioning difference of the two assembly's in your screen shot as well..

like image 149
MethodMan Avatar answered Dec 26 '22 01:12

MethodMan