Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading from Entity Framework 6.2 to 6.3.0 in NuGet

Entity Framework 6.3.0 was published on 2019 Sep 23. I have two projects in my solution that were using 6.2 and I tried to upgrade to 6.3.0 via NuGet.

One project called DatabaseInterface has an output type of "class library". The other project outputs a "console application".

When I run the upgrade from NuGet the following error happens for the project that is the class library.

An error occurred while applying transformation to 'App.config' in
project 'DatabaseInterface' No element in the source document matches
'/configuration/configSections/section[@name='entityFramework']'

This project, called DatabaseInterface does not even have an App.config file so the error is referring to a file that does not exist. This project has a packages.config file.

Published problems with a similar error are related to web projects so they are probably not closely relevant to my problem. What is the solution to this problem?

Context: Visual Studio 2017 Community, Visual Studio 2019 Community, Windows 10

like image 647
H2ONaCl Avatar asked Oct 15 '19 01:10

H2ONaCl


People also ask

How do I change Entity Framework version?

Right-click on your project in Solution Explorer and select Manage NuGet Packages... Select Updates. Select EntityFramework (make sure it is going to update it to the version you want) Click Update.

What is latest version of Entity Framework?

The most recent Entity Framework Core 6.0 (EF Core 6) was released on 10 November 2021.

How do I tell what version of Entity Framework is installed?

If you go to references, click on the Entity Framework, view properties It will tell you the version number.

What OS does EF6 support?

This means that EF 6.3 is cross-platform and supported on other operating systems besides Windows, like Linux and macOS. The migrations commands have been rewritten to execute out of process and work with SDK-style projects.


1 Answers

Uninstall 6.2 and then install 6.3. This seems to cause the automatic deletion of packages.config and there will be no error associated with App.config nor will there be the creation of that file. Subsequent builds do not seem to require the presence of packages.config.

like image 163
H2ONaCl Avatar answered Oct 12 '22 14:10

H2ONaCl