Wednesday, 21 August 2013

The primary reference could not be resolved because it was built against a higher version of the .NET framework than the currently targeted...

The primary reference could not be resolved because it was built against a
higher version of the .NET framework than the currently targeted...

I am trying to build a project that references a 3rd party
SlingshotClient.dll. The project builds fine on other developers
workstations. However, I am getting the error below. One difference that I
could imagine is contributing to my issue is that I also have VS 2012 and
.NET Frameworks 4.5 installed on my machine. I believe the other
developers that can build this successfully, don't have those installed.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5):
warning MSB3274: The primary reference "SlingshotClient, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=bb5a8745472e181a,
processorArchitecture=MSIL" could not be resolved because it was built
against the ".NETFramework,Version=v4.5" framework. This is a higher
versio n than the currently targeted framework
".NETFramework,Version=v4.0".
The error seems to be saying that our project targets the framework
version 4.0 (which is correct), but the referenced SlingshotClient.dll was
built targeting framework version 4.5. When I look at the
SlingshotClient.dll in the dissembler, it looks to me that the assembly
was built targeting framework version 4.0

No comments:

Post a Comment