Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB3274 error code.
Message text
MSB3274: The primary reference 'value' could not be resolved because it was built against the 'value' framework. This is a higher version than the currently targeted framework 'value'.
Description
This error occurs in .NET Framework projects when the version of a reference is higher than the version you're currently building for.
Resolution
Consider targeting a more recent version of the .NET Framework. For instance, if your project targets .NET Framework 4.7.2, you might see this error if you reference a NuGet package or another project that targets .NET Framework 4.8.
In Visual Studio, check the Target framework in the project's property pages. For more information, see Framework targeting overview.
In a project file, you can set the target framework as follows:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
To suppress this error, you can set the following MSBuild property:
<PropertyGroup>
<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
</PropertyGroup>
For a guide on resolving errors with assembly references, see Troubleshoot assembly references.
For more information, see MSBuild target framework and target platform and Source code.
Applies to
All versions of MSBuild