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
When APICompat is comparing libraries from different frameworks and only has one set of references, and those references differ on CoreLib, APICompat may generate identifiers that are not consistent
Roslyn has enough to resolve that System.Nullable<System.Int32> should be System.Int32? but it is not.
It seems like this is due to the fact that in this case, the left symbol references Nullable in System.Runtime 8.0 - but right hand side has System.Runtime in netstandard. The right hand side references do contain a facade for System.Runtime that can forward the type to netstandard, but roslyn doesn't appear to be resolving this. It could be due to the version mismatch (netstandard's System.Runtime is version 4.1.2.0).
It's pretty unusual to do this type of comparison where a package replaces a framework specific asset (net8.0) with a more generic asset (netstandard2.0) and in general this comparison is not compatible from a consumption side of things (consuming net8.0 in netstandard2.0) but it is compatible from a production perspective.
The text was updated successfully, but these errors were encountered:
If I force the compiler to use the same references that we use for the right-hand-side (even though the framework is not compatible) It is enough to avoid this error.
Describe the bug
When APICompat is comparing libraries from different frameworks and only has one set of references, and those references differ on CoreLib, APICompat may generate identifiers that are not consistent
To Reproduce
Discovered in dotnet/wcf#5742 (comment)
While debugging I noticed the comparsion strings for the two sides differ:
Roslyn has enough to resolve that
System.Nullable<System.Int32>
should beSystem.Int32?
but it is not.It seems like this is due to the fact that in this case, the left symbol references Nullable in System.Runtime 8.0 - but right hand side has System.Runtime in netstandard. The right hand side references do contain a facade for System.Runtime that can forward the type to netstandard, but roslyn doesn't appear to be resolving this. It could be due to the version mismatch (netstandard's System.Runtime is version 4.1.2.0).
It's pretty unusual to do this type of comparison where a package replaces a framework specific asset (net8.0) with a more generic asset (netstandard2.0) and in general this comparison is not compatible from a consumption side of things (consuming net8.0 in netstandard2.0) but it is compatible from a production perspective.
The text was updated successfully, but these errors were encountered: