blazor“独立”模板将其包含在项目的 .csproj
中:
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
这是什么?它有记录在某处吗?
最佳答案
找到解释here :
Blazor WebAssembly apps target the full .NET API surface area, but not all .NET APIs are supported on WebAssembly due to browser sandbox constraints. Unsupported APIs throw PlatformNotSupportedException when running on WebAssembly. ... For Blazor WebAssembly apps, this means checking that APIs are supported in browsers
因此它通知分析器和编译器检查应用程序是否仅使用与 wasm 兼容的 BCL/FCL 类。
关于c# - Blazor 模板的 csproj 中的 SupportedPlatform,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72040920/