After cloning a repo, I've failing to build the solution getting build errors regarding some Nuget packages. Here's a list:
- error NU1202: Package Microsoft.Graph 5.49.0 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.Graph 5.49.0
does not support any target frameworks.- error NU1202: Package Microsoft.Graph.Core 3.1.10 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.Graph.Core 3.1.10 does not support any target frameworks.
- error NU1202: Package Microsoft.Kiota.Abstractions 1.8.0 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Abstractions 1.8.0 does not support any target
frameworks.- error NU1202: Package Microsoft.Kiota.Authentication.Azure 1.1.4 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Authentication.Azure 1.1.4 does not support any
target frameworks.- error NU1202: Package Microsoft.Kiota.Http.HttpClientLibrary 1.3.8 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Http.HttpClientLibrary 1.3.8 does not support any
target frameworks.- error NU1202: Package Microsoft.Kiota.Serialization.Form 1.1.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Serialization.Form 1.1.5 does not support any target
frameworks.- error NU1202: Package Microsoft.Kiota.Serialization.Json 1.2.0 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Serialization.Json 1.2.0 does not support any target
frameworks.- error NU1202: Package Microsoft.Kiota.Serialization.Multipart 1.1.3 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Serialization.Multipart 1.1.3 does not support any
target frameworks.- error NU1202: Package Microsoft.Kiota.Serialization.Text 1.1.4 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package
Microsoft.Kiota.Serialization.Text 1.1.4 does not support any target
frameworks.
What I've tried so far (not necesairally in that order): Clean the solution (manually as well) Cleaning Nuget cache Repair Visual Studio (2022) Reinstalling Visual Studio (2022) Reinstalling .NET 8
but I am always get those build errors.
At some point I even got this error message but I cannot reproduce it anymore.
NU1202: Package Microsoft.IdentityModel.Abstractions 7.4.1 is not compatible with net8.0-windows7.0 (.NETCoreApp,Version=v8.0). Package Microsoft.IdentityModel.Abstractions 7.4.1 does not support any target frameworks.
Notice the windows7 in the last one.
Is there anyone that experienced this before? Why can't I build the project?
Here's the output, in case it's helpful, from the dotnet --info
command.
.NET SDK:
Version: 8.0.204
Commit: c338c7548c
Workload version: 8.0.200-manifests.7d36c14f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.204\
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.4
Architecture: x64
Commit: 2d7eea2529
.NET SDKs installed:
8.0.204 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Deleted obj and bin folders. Then dotnet restore
.