I've created a new Blazor WebAssembly project in Visual Studio which, by default, targets .NET Standard 2.1 and therefore uses C# 8.
I've also written a library written for .NET 5 and used C# 9 in it.
How can I use this library in my Blazor project? I can't reference a .NET 5 library in a .NET Standard 2.1 project.
If you need to migrate your Blazor WebAssembly project to .NET 5, check this out https://learn.microsoft.com/en-us/as.net/core/migration/31-to-50?view=as.netcore-5.0&tabs=visual-studio#update-blazor-webassembly-projects
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.