Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix an assembly referencing an old (beta) version of .NET?

I'm trying to compile a project in Visual Studio 2010. It worked fine in Visual Studio 2008 but 2010 is giving the following error:

The primary reference "TiS.Core.eFlowAPI" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "2.0.3600.0" than the version "2.0.0.0" in the current target framework.

I've tracked down the culprit to MDbgCore.dll. This assembly is included (in a dependency chain) and it is looking for mscorlib 2.0.3600.0.

After doing some research it looks like that is a beta version of .NET 2.0.

How do I solve this problem? I don't have access to the code of this third party DLL (ie. TiS.Core.eFlowAPI).

like image 859
SofaKng Avatar asked Feb 02 '11 15:02

SofaKng


People also ask

How do I change the reference version in Visual Studio?

Open the project in Visual Studio. Right-click on the project's References folder and select Add Reference to open the Add Reference dialog box. Locate the new assembly version in the Add Reference dialog for each Infragistics assembly listed in your References folder.

What is the reference assemblies folder?

Reference assemblies are usually distributed with the Software Development Kit (SDK) of a particular platform or library. Using a reference assembly enables developers to build programs that target a specific library version without having the full implementation assembly for that version.

Where do I find assembly version?

You can use Reflector, ILDASM or ILSpy to get the assembly version. You usually can find ILDASM in C:\Program Files (x86)\Microsoft SDKs\Windows\v8. 1A\bin\NETFX 4.5.

What is Publickeytoken for DLL?

The public key token is a unique 16-character key that is given to the assembly when it is built and signed in Microsoft Visual Studio. To determine the public token key, you can run the Strong Name tool (sn.exe) on the assembly. The sn.exe is available with the Microsoft .


1 Answers

I've solved it. Perhaps the wrong way but I used Reflexil to modify the offending DLL so it pointed to the correct version of .NET.

like image 81
SofaKng Avatar answered Nov 14 '22 00:11

SofaKng