Skip to content
Latchkey

NuGet "NU1701: package was restored using a different framework"

NuGet could not find an asset for your project’s target framework, so it fell back to a package built for a different framework (often .NETFramework) and warned with NU1701. It may work - or it may fail at runtime - and it breaks the build under warnings-as-errors.

What this error means

Restore prints NU1701 saying a package was restored using a fallback framework "instead of the project target framework". It is a warning by default but is promoted to an error wherever NuGet warnings are treated as errors.

dotnet restore output
warning NU1701: Package 'LegacyHelpers 1.4.0' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v8.0'. This package may not be fully compatible with your project.

Common causes

Package has no asset for your TFM

The package only ships .NETFramework (or another) assets. NuGet uses the fallback (AssetTargetFallback) so restore succeeds, but the package was not built for your target.

Warnings promoted to errors

NU1701 is informational by default. A warnings-as-errors policy turns the framework fallback into a hard build failure.

How to fix it

Use a package version that targets your framework

Prefer a release with a netstandard2.0+ or matching net8.0 asset so no fallback is needed.

Terminal
dotnet package search LegacyHelpers
# pin a version with a netstandard/net8.0 asset, or find a maintained alternative

Suppress NU1701 only when the fallback is verified safe

If you have confirmed the fallback package works at runtime, suppress the warning narrowly.

.csproj
<PropertyGroup>
  <NoWarn>$(NoWarn);NU1701</NoWarn>
</PropertyGroup>

How to prevent it

  • Prefer packages that ship netstandard2.0+ assets for cross-target compatibility.
  • Treat NU1701 as a signal to replace or upgrade a package, not just silence it.
  • Verify fallback packages at runtime before suppressing the warning.

Frequently asked questions

What causes ""NU1701: ... restored using ... instead""?
The package only ships .NETFramework (or another) assets. NuGet uses the fallback (AssetTargetFallback) so restore succeeds, but the package was not built for your target.
How do I fix "NU1701: ... restored using ... instead"?
Prefer a release with a netstandard2.0+ or matching net8.0 asset so no fallback is needed.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card