Tuesday, November 1, 2016

VS Error: This is a higher version than the currently targeted framework

The primary reference XXX could not be resolved because it has an indirect dependency on the assembly XXX which was built against the ".NETFramework,Version=v4.5.1" framework.
This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5".


Resolution :

1- Edit Project File "myProject.csproj" in any text editor.
2- inside the <Project> element Add:
<PropertyGroup>  <ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
</PropertyGroup>



2 comments:

Cristiano said...

Thanks, it's was very usefull for me!

Yuvi`world said...

It help only while it is compiling but in runtime it isshowing the error.