-
Notifications
You must be signed in to change notification settings - Fork 181
Analyzer Erroneously Reports Incompatibilities for EF Core projects #993
Comments
I created the repro based in above steps, and apiport analyze report shows that Microsoft.EntityFrameworkCore.dll not 100% compatable with .NET5 even though it is .netstandard v2 dll, which doesn’t make sense. APIPort tool uses .NET API Catalog (apisof.net) as backend data. @ericstj and @terrajobst Looking into APICatalog, .NET API Catalog (apisof.net) shows that Microsoft.EntityFrameworkCore.dll APIs like NotParameterizedAttribute class is only supported on .NET6, do you know why this that? Looking into .Net doc, it shows that it is supported from v1.0 to v5.0. |
Hi @ericstj @terrajobst @Lxiamail is there any update or plans to update this? |
Following up, I asked for an update on #993. Will update again when I hear back. |
I'm not familiar with the API catalog data, @terrajobst @carlossanlop do either of you know how API catalog represents nuget packages like EF? |
Note that I'm not seeing this today. I see a few members that aren't supported on .NET 5. APIPort doesn't say anything about .NET 6, but apisof says that those APIs are supported in 6. Specifically |
I wonder if that's because of "Skip Microsoft .NET assemblies" in v2.8.10-alpha from https://github.com/microsoft/dotnet-apiport/releases/tag/v2.8.10-alpha |
apisof.net has the version 6.0 of the package indexed. That package includes a .NET 6 only binary, so the displayed data seems correct.
API Port (the tool in this repo) doesn't use apisof.net as the backend, it has its own API Port backend which is populated from our old internal SQL Server based API Catalog which doesn't understand packages. It was populated with flat folders, because when we initially built it we only had to support old-school targeting pack based frameworks. .NET Core v1 came later. We worked this around by introducing the fake frameworks "<platform> <version> + Platform Extensions" which included the platform assemblies plus some set of assemblies we restored from certain NuGet packages. That's why EF shows up as supported in those but not in .NET 5 because that just contains the platform API and EF is an OOB. The proper fix for this would be to update API Port to use the data that apisof.net is using, which would include OOB package information as well. |
What are next steps? @Lxiamail @ericstj @Pilchie do you need anything from me to move forward based on the "proper fix" explanation by @terrajobst? |
Closing as API Port was deprecated in favor of binary analysis in .NET Upgrade Assistant. |
I made a simple project with EF Core 3.1 on .NET 4.7.2. It ran fine. I then ran the portability analyzer and it flagged several EF Core constructors, methods, and properties as incompatible with multiple various of .NET Core and .NET 5. Report is attached. To verify these are invalid incompatibilities, I used the upgrade assistant to upgrade from .NET 4.7.2 to .NET 5. It upgraded with no issue and ran fine after the upgrade.
Reproduce:
Microsoft.EntityFrameworkCore.Sqlite
version 3.1.19Program.cs
Program.cs
:The text was updated successfully, but these errors were encountered: