Error: The reference assemblies for ".NETFramework,Version=v6.0" were not found

1.4k Views Asked by At

I need help, because I can't solve this problem alone. I rebuild a C# project in VS 2019.

In first, I didn't have dotnet folder, so I downloaded it from here:

Download .NET Core 2.1

Download .NET Core 2.1 - Img

and now I get this error:

The reference assemblies for ".NETFramework,Version=v6.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.

This is the output from running dotnet --info on my machine:

.NET Core SDK (reflecting any global.json):
Version:   2.1.500
Commit:    b68b931422
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19045
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\2.1.500\
Host (useful for support):
  Version: 2.1.6
  Commit:  3f4f8eebd8
.NET Core SDKs installed:
  2.1.500 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

And this is the .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems> 
  </PropertyGroup>

What do I need to do?

Thanks

0

There are 0 best solutions below