Primary link could not be resolved because it was built against a higher version than the target framework

First of all: I have knowledge of an immediate solution to the problem in the title.

I know this problem occurs whenever a dll reference is referencing a project built against a different framework.

I have a project built for .NET Framework 4.0 and I am referencing the RestSharp dll that targets the same framework.

The print below is taken from JetBrain DotPeek. Printscreen

Dunno, if this seal means something at all, but nevertheless. Vs2010 printscreen

The error displayed in the output window is

The primary reference "RestSharp" could not be resolved because it was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

      

I am using VS2010.

+4


source to share


1 answer


You are having this problem because this version of the DLL was built using the .net Framework 4.6.

To fix this, you can use one of the following methods:



  1. Find that DLL built with .net Framework 4.0
  2. Clone the repository and build it yourself, pointing to .net framework 4.0
  3. Change your project to target .net Framework 4.6
0


source







All Articles