Runtime: Don't build if used any of not supported API

Created on 29 Nov 2018  路  3Comments  路  Source: dotnet/runtime

The Blazor FAQs says:

Yes, the .NET runtime used for Blazor supports .NET Standard 2.0. APIs that aren't supported in the browser throw Not Supported exceptions.

There are any list with unsopported APIs of the .NET Standard? Can a MSBuild task used to interrumpt the build and mark as error if any of this APIs are used instead of detect the error in execution time when the exception is thrown?

arch-wasm area-Meta code-analyzer

Most helpful comment

We don't have the precise list yet of the .NET Standard APIs that will work in Blazor. A lot of APIs already work today. Some APIs will work, but haven't been implemented yet. Others will never work because of the constraints of running in the browser. I can imagine us shipping an analyzer that provides a build time experience for detecting usage of APIs that won't work.

All 3 comments

We don't have the precise list yet of the .NET Standard APIs that will work in Blazor. A lot of APIs already work today. Some APIs will work, but haven't been implemented yet. Others will never work because of the constraints of running in the browser. I can imagine us shipping an analyzer that provides a build time experience for detecting usage of APIs that won't work.

/cc @lewing. Having the portability analyzer would help here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bencz picture bencz  路  3Comments

omajid picture omajid  路  3Comments

btecu picture btecu  路  3Comments

v0l picture v0l  路  3Comments

EgorBo picture EgorBo  路  3Comments