I was trying to build a react app using Dotnet. I have installed dotnet but still getting this error. I have installed dotnet 5 and dotnet core 3.5. I have given the necessary images regarding the error.
Oddly for my project, the user's computer couldn't find restorable packages because it didn't have a mapping for (the real) nuget. We had to add (or run from powershell):
dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json
Then nuget restore worked and the error went away.
Between older version of .NET 5.0 there has been an rename of the targetFramework.
.net 5.0 vs netcoreapp5.0 Github
If your nuget package version doesn't contain your target framework,
please update or align the targetframework in your csproj file
with the contents of the nuget package or choose a more recent package.
Now it should be net5.0