upgrade-assistant and EntityFramework

128 Views Asked by At

I have an issue, every time i try to use the upgrade-assistant tool it tries to remove entityFramework from a library containing it, and then update the library to NetStandard2.0.

This is not helping since this library need to contain EF6 and EF6 is available in 2 Framework, .NET4.5, .NET4.8 and .NETStandard2.1.

Is there any way to tell to the tool to update this lib to .NET Standard 2.1 and avoid her removing my reference to EntityFramework ?

FYI : The whole ASP project is currently in 4.5.1 and i want to update it to Net6. The project contains multiples libraries : a DAL, a BLL, a DTO and the tool tries to change the DAL version from a .NET4.5.1 to a NetStandard2.0 even though EF6 is present inside. What's strange and funny is that the other library are updated to NET6... EF6 version : 6.1.3 (Updating it to the last version made no changes)

What i've tried so far consist of adding the cmd argument : "--target-tfm-support LTS" because otherwise the tool will update my projects to NET7 (which is not what i'm looking for at the moment).

I expected that the tool was able to find out that EntityFramework is compatible with "NET Standard 2.1" (https://github.com/dotnet/ef6/blob/main/src/EntityFramework/EntityFramework.csproj), but when he tries to lookup for it he states that there is not compatible version of EF6 :

[11:26:58 INF] Initializing upgrade step Target compatibility reference analyzer [11:27:05 WRN] Failed to get package versions from source https://api.nuget.org/v3/index.json due to an HTTP error (null) [11:27:05 WRN] No version of EntityFramework found that supports ["netstandard2.0"]; leaving unchanged [11:27:11 WRN] Failed to get package versions from source https://api.nuget.org/v3/index.json due to an HTTP error (null) [11:27:11 WRN] No version of EntityFramework.fr found that supports ["netstandard2.0"]; leaving unchanged

That's clearly an issue because i loved that EntityFramework could be kept in the App without huge modifications, in my company we have a lot of App to migrate from Net Standard to Net6 and if it's needed to redo every EF in every App this will put a big hold on this migration...

0

There are 0 best solutions below