Using a fully updated VS 2019 (Community) and Elements 10.0.0.2485
- Create new project using “ASP.NET Core API” template
NOTE: There is no
packages.config in the project at this point.
- Tools -> Manage NuGet packages for Solution and install Microsoft.EntityFrameworkCore 3.1.3
After accepting the license(s), package installation (eventually) fails with error:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
This appears to be the result of some strange behaviour during the package installation process whereby as each package is added to satisfy the dependencies of EF Core, a copy is made of
packages.config (although there is no original, actual file called
packages.config) each of which are added to the project, with the filename extending in each instance presumably to ensure uniqueness:
- In an effort to prevent this behaviour before trying again, I deleted all but the latest copy of packages.config (i.e. I kept the one with the longest file name). I then renamed this to simply packages.config and tried to use “Migrate to PackageReference”.
This resulted in an error:
Proceeding with the
packages.configfrom step 3 and again installed EntityFrameworkCore 3.1.3, this was successful, without creating further copies of packages.config, but updating the one that was now present.
However, then trying to install EntityFrameworkCore.SqlServer failed with a different error:
Project settings were not changed from the template defaults:
Is it possible to create a ASP.NET Core web Api application that uses EF Core with Oxygene ? What am I doing wrong here ?
Note: following the exact same, basic steps (new project, install packages EFCore and EFCoreSqlServer) “just works” (without creating a packages.config) using both VS2019 and JetBrains Rider (Microsoft C# projects, obviously).