Skip to content

Commit

Permalink
Throw if unsupported .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
lithiumtoast committed May 7, 2024
1 parent c7bcb14 commit 27ce96b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ private NuGetFramework TargetFramework(string? targetFrameworkMoniker)
$"The Target Framework Moniker (TFM) '{targetFrameworkMoniker}' is not supported because it has a platform. Remove the platform parts from the TFM and try again.");
}

if (nuGetFramework.IsUnsupported)
{
throw new InvalidOperationException(
$"The Target Framework Moniker (TFM) '{targetFrameworkMoniker}' is not supported.");
}

return nuGetFramework;
}

Expand Down

0 comments on commit 27ce96b

Please sign in to comment.