staticwebdev / blazor-starter

A starter template in C# APIs and Blazor for Azure Static Web Apps
217 stars 104 forks source link

(vs 2022) Basic clone & build of Api project does not build, Dotnet 6 incompatibility with System.Runtime.CompilerServices.Unsafe 4.5.0 #25

Closed KungFuryKeyboard closed 2 years ago

KungFuryKeyboard commented 2 years ago

reproduction:

  1. clone project. (add shared back into the sln as it crashes otherwise) I see there is another pull request for that.
  2. right click of API project click build.

This is the output regardless of cleaning the api project, deleting the obj folder etc....

"logs": [ { "code": "NU1202", "level": "Error", "message": "Package System.Runtime.CompilerServices.Unsafe 4.5.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package System.Runtime.CompilerServices.Unsafe 4.5.0 supports: uap10.0.16300 (UAP,Version=v10.0.16300)", "libraryId": "System.Runtime.CompilerServices.Unsafe", "targetGraphs": [ "net6.0" ]

} 2021-11-17 16_16_40-BlazorStaticWebApps - Microsoft Visual Studio Preview

2021-11-17 16_18_39-BlazorStaticWebApps - Microsoft Visual Studio Preview

anthonychu commented 2 years ago

This doesn't reproduce with the latest changes. Please reopen if still a problem. Thanks.