[英]How to use C# 9 in Blazor WebAssembly project?
I've created a new Blazor WebAssembly project in Visual Studio which, by default, targets .NET Standard 2.1 and therefore uses C# 8.我在 Visual Studio 中创建了一个新的 Blazor WebAssembly 项目,默认情况下,它的目标是 .NET Standard 2.1,因此使用 C# 8。
I've also written a library written for .NET 5 and used C# 9 in it.我还编写了一个为 .NET 5 编写的库,并在其中使用了 C# 9 。
How can I use this library in my Blazor project?如何在我的 Blazor 项目中使用这个库? I can't reference a .NET 5 library in a .NET Standard 2.1 project.
我无法在 .NET 标准 2.1 项目中引用 .NET 5 库。
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如果您需要将您的 Blazor WebAssembly 项目迁移到 .NET 5,请查看https://learn.microsoft.com/en-us/as.net/core/migration/31-to-50?view=as.netcore- 5.0&tabs=visual-studio#update-blazor-webassembly-项目
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.