You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
A bunch of APIs on Type are not supported in .NET Core. Running ApiPort on an assembly that uses these types will recommend adding a call to GetTypeInfo(). Doing so will indeed make the code portable to .NET Core. However, running the portability analyzer on an assembly that does call GetTypeInfo() for these APIs will still report them as unsupported.
This is because for the .NET Framework, TypeInfo derives from Type and simply inherits those APIs. So in the method table you never see TypeInfo.get_Assembly, just Type.get_Assembly even if you are accessing it via a TypeInfo object.
To report portability of these APIs correctly would probably require analyzing the IL at the call sites.
The APIs on Type are some of the most common ones encountered that aren't supported on .NET Core. So this issue makes it hard to use ApiPort to track progress towards .NET Core compatibility.
The text was updated successfully, but these errors were encountered:
I suspect the best way to actually fix this is to add the overrides in the full framework itself so that these show up as calls to TypeInfo. Baring that I don't see any clean way to do this directly in ApiPort itself that isn't a big hack.
A bunch of APIs on Type are not supported in .NET Core. Running ApiPort on an assembly that uses these types will recommend adding a call to
GetTypeInfo()
. Doing so will indeed make the code portable to .NET Core. However, running the portability analyzer on an assembly that does callGetTypeInfo()
for these APIs will still report them as unsupported.This is because for the .NET Framework,
TypeInfo
derives fromType
and simply inherits those APIs. So in the method table you never seeTypeInfo.get_Assembly
, justType.get_Assembly
even if you are accessing it via aTypeInfo
object.To report portability of these APIs correctly would probably require analyzing the IL at the call sites.
The APIs on
Type
are some of the most common ones encountered that aren't supported on .NET Core. So this issue makes it hard to use ApiPort to track progress towards .NET Core compatibility.The text was updated successfully, but these errors were encountered: