dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.66k stars 3.16k forks source link

The specified deps.json [..] does not exist after VS 2019 update #16386

Closed vsfeedback closed 1 year ago

vsfeedback commented 5 years ago

Create new .net core MVC project, run it, stop debug, then write in Package Manager Console the string to add migration:

PM> add-migration initial
The specified deps.json [G:\testef\TestEf2\TestEf2.deps.json] does not exist
PM> add-migration -v initial
Using project 'TestEf2'.
Using startup project 'TestEf2'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile **G:\testef\TestEf2\TestEf2.deps.json** --additionalprobingpath C:\Users\snytko\.nuget\packages --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools\2.2.0\tools\netcoreapp2.0\any\ef.dll" migrations add initial --json --verbose --no-color --prefix-output --assembly G:\testef\TestEf2\TestEf2.dll -- startup-assembly G:\testef\TestEf2\TestEf2.dll --project-dir G:\testef\TestEf2\ --language C# --working-dir G:\testef\TestEf2 --root-namespace TestEf2
The specified deps.json [G:\testef\TestEf2\TestEf2.deps.json] does not exist
PM> 

It was working before update of VS 2019. Now I have 16.1.3. Generated files are inside in G:\testef\TestEf2\bin\Debug\netcoreapp2.2 folder.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/610087/the-specified-depsjson-does-not-exist-after-vs-201.html VSTS ticketId: 923080 These are the original issue comments:

Visual Studio Feedback System on 6/18/2019, 02:59 AM (13 days ago): We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 6/18/2019, 11:06 PM (12 days ago): Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq . In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/ . We'll keep you posted on any updates to this feedback.

These are the original issue solutions:

xekegedud solved on 6/21/2019, 10:09 AM (10 days ago), 0 votes:

I have tried this at home (this is OP posting) on my home machine and it works on 16.1.2 and after I updated to 16,1,3 it works too. So I just need to fix this error on my work machine; the only problem I dont know how.

xekegedud solved on 6/27/2019, 00:39 AM (4 days ago), 0 votes:

updated to 16.1.4, still the same output:

PM> add-migration test -v
Using project 'TestEf2'.
Using startup project 'TestEf2'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile G:\testef\TestEf2\TestEf2.deps.json --additionalprobingpath C:\Users\snytko\.nuget\packages --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools\2.2.0\tools\netcoreapp2.0\any\ef.dll" migrations add test --json --verbose --no-color --prefix-output --assembly G:\testef\TestEf2\TestEf2.dll --startup-assembly G:\testef\TestEf2\TestEf2.dll --project-dir G:\testef\TestEf2\ --language C# --working-dir G:\testef\TestEf2 --root-namespace TestEf2
The specified deps.json [G:\testef\TestEf2\TestEf2.deps.json] does not exist
PM> 
alwilton commented 4 years ago

I hope I have done what you have asked for - the report is at https://developercommunity.visualstudio.com/content/problem/804599/the-specified-depsjson-does-not-exist-after-vs-201-1.html

If needed I can send a report from my VM where the commend succeeds. HTH

Shiko1st commented 4 years ago

If you can, it would be great if you can reproduce the problem (run (Get-Project ApiAuthSample).ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Value to see it error) and then use the Report a Problem system in Visual Studio as that will capture a memory dump that will hopefully allow me to see more of what is going on. If you can link to the report that is created here, I will be able to find it more easily.

I have exception if to run this over my project XXX (Properties object is null): (Get-Project XXX).ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath') Will it be useful if I will send report through Report System too?

ajcvickers commented 4 years ago

Triage: closing this here as a problem has been reported to VS and there is nothing actionable on the EF side at this point. We can re-open if the situation changes.

FrankSzendzielarz commented 4 years ago

FWIW I got this working by using Add... New Scaffolded Item … Controller (rather than Add Controller) .. and that succeeded in producing an API controller (.net core 3) with access methods and EF. The Add Controller direct just screamed there were was a missing deps.json file, whatever that is, from the bin subfolder.

alwilton commented 4 years ago

This boils down to an environment issue and VS 2019. For me the workaround is to use the CLI instead of VS. See https://developercommunity.visualstudio.com/content/problem/800508/new-scaffolded-item-razor-pages-using-entity-frame.html for the underlying problem that is still not fixed as of today.

pankajrayal commented 4 years ago

As of today, you can use dotnet CLI to create migration.. It is working as I checked it just today with VS2019.

dotnet ef migrations add InitialCreate

pbocej commented 4 years ago

Working solution via Alan Wilton the only viable work around is to use the command line interface (CLI). I've been able to do what I need to do so far with that but it is a pain and irritating to need to do that. For instance you would open a command prompt in your project root folder and enter something like "dotnet ef dbcontext scaffold "server=192.168.100.10;port=3306;user=myusername;password=mypasword;database=thedatbase" Pomelo.EntityFrameworkCore.MySql -o Models\thedatabase -d" to scaffold a database.

reference https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet

Peter

erikthysell commented 4 years ago

Have similar issue when trying to add controller (Add API Controller with actions, using Entity Framework) to a asp.net core 3.1 server using VS2019 16.5.1 missing [projectname].server.deps.json.

goestrip commented 4 years ago

Have had the same issue, deps file at wrong location (inside \bin\debug\etc...), if moved manually it worked but then migration were not applied ...

none of the advices in this feed worked, then i tried with visual 2017, and everything worked ...

sotomo commented 4 years ago

I experienced this problem today when adding scaffolding for Identity, but it started working after I updated Visual Studio to 16.5.3. Luckily, I was creating a new project. I don't know if updating would resolve the problem in an existing project.

Mr-Mantas commented 4 years ago

Experiencing same issue when using Add-Migration InitialCreate command: *.deps.json is not found in ProjectDir (however, it does exist in '.\bin\debug\netcoreapp3.1\'). Tried every solution written above - nothing helped (except one workaround).

Setup:

Workaround: Don't use VS Package Manager Console to create / update database, but instead use command line. Open cmd and follow these steps. It created migrations and after running second command (update) database too. Not comfortable, but you can live with that as after running those commands you can continue using VS as normal (until you need to update create new migrations again). Bear in mind: Database was created in ProjectDir so had to move it into debug dir by myself.

mitselplik commented 4 years ago

This happened for me today. I am creating a project in VS 2019 (16.5.3) that uses Entity Framework Core SqlLite (3.1.3) Steps to reproduce.

  1. Do something stupid like define the same property twice in your DbContext.
  2. Try to use "Add Controller..." and select the API option with Entity Framework.
  3. Wait for the error to happen and the helper to fail to add a controller.
  4. Fix the problem with the extra property.
  5. Repeat step 2 - this error now occurs.
mitselplik commented 4 years ago

I was able to resolve the issue by uninstalling the Microsoft.EntityFrameworkCore.SqlLite package and installing Microsoft.EntityFrameworkCore.SqlServer instead.

thomasio101 commented 4 years ago

I encountered a similar error today. Somehow it was resolved after I had resolved all build errors.

lequanghuygialai commented 4 years ago

I ran into the same problem. And for my case, I check the .csproj file and this has double row PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design". I remove one of them. Maybe help someone.

codez-bi commented 4 years ago

Same problem after update to VS Version 16.6.0. Just tried to add new column.

Solved by updating all packages with NuGet Package Manager.

bearoxide commented 4 years ago

Something had happened with my projects today and I've started experiencing the same issue. No updates of VS these days. CLI doesn't work too. For several projects I've generated the deps file this way: I have added the line <UsingTask TaskName="GenerateDepsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" /> into project file and then published it. Then I copied generated deps file into the folder where VS expected it to be. But I can't publish some projects due to the same error.

RedAngel007 commented 4 years ago

This error is definitely environment related. I use a Mac book pro so I have VS 2019 Professional installed in a Parallels Desktop env on the Mac. The error occurs when I have a directory name which includes a space in the file path.

Error message:

Screenshot 2020-09-10 at 08 52 53

I head over to powershell and tried to navigate to that directory. This showed me that the path was not accessible

Screenshot 2020-09-10 at 09 12 58

The error disappeared when I removed the space in the name of the directory (Stores Setup) in the folder path Success:

Screenshot 2020-09-10 at 09 06 07

I'm very sure this is just one of the few causes of this issue. But it sure seems to be related to locating files

jrmoreno1 commented 3 years ago

@pankajrayal wrote:

As of today, you can use dotnet CLI to create migration.. It is working as I checked it just today with VS2019.

dotnet ef migrations add InitialCreate

Just note for any future users, you need to install the ef tool first:

dotnet tool install --global dotnet-ef then dotnet ef migrations add InitialCreate or dotnet ef database update.

Also, if you want to use anything other than the current stable version use the --version flag with whatever version you want.

bwjunkie commented 3 years ago

re: deps.json does not exist on Scaffold-DbContext

environment issue (can happen on ANY recent version of VS)

including 16.7.6 AND Version 16.8.0 Preview 5.0

Removing/Adding Azure package from VS installer does NOT help (for me)

It was working fine a couple weeks ago and I've never had Azure package installed.

pmcastillo79 commented 3 years ago

I am facing this issue this is my verbose response from the command:

C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\3.1.9\tools\netcoreapp2.0\any\ef.dll" database update --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist

I cant Understand, so many people is facing this problem why so close the ticket? this is a real problem.

:/

bricelam commented 3 years ago

To provide an update... The .NET project system team thinks this is caused by either a corrupted solution file or by having an invalid Active solution configuration selected.

image

We've updated the error in EF Core 5.0 to provide more details and hopefully get to the bottom of this.

bricelam commented 3 years ago

/cc @lifengl

alwilton commented 3 years ago

Brice, Thank you for staying on top of this. Please see my try to cut to the chase on this issue here https://developercommunity.visualstudio.com/content/problem/1061310/project-configuration-manager-properties-is-blank-1.html. Even though this heavily effects some of us with EF there is more to it. Further I recently moved my workstation to a VM and it still has the issue. I also wiped my workstation completely (the old FDISK and FORMAT) and re-installed a different version of W10 and it still has the issue. Meanwhile a clean install of a VM on my Dev Server does not have the issue.

pmcastillo79 commented 3 years ago

@bricelam

hi Brice, I just change the configuration file, tested and the problem is not solved. If you want I can provide you access to my computer so you can see the error.

this is my solution file text

Microsoft Visual Studio Solution File, Format Version 12.00

Visual Studio Version 16

VisualStudioVersion = 16.0.30523.141 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrudEntityFramework", "CrudEntityFramework\CrudEntityFramework.csproj", "{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 EFCoreTest|Any CPU = EFCoreTest|Any CPU EFCoreTest|x64 = EFCoreTest|x64 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|Any CPU.Build.0 = Debug|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|x64.ActiveCfg = Debug|x64 {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|x64.Build.0 = Debug|x64 {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|Any CPU.ActiveCfg = EFCoreTest|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|Any CPU.Build.0 = EFCoreTest|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|x64.ActiveCfg = EFCoreTest|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|x64.Build.0 = EFCoreTest|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|Any CPU.Build.0 = Release|Any CPU {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|x64.ActiveCfg = Release|x64 {12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {353C6B28-8C3E-4A85-951E-4A2DBFBC488A} EndGlobalSection EndGlobal

this is my csproj file

netcoreapp3.1 AnyCPU;x64 Debug;Release;EFCoreTest all runtime; build; native; contentfiles; analyzers; buildtransitive

the verbose log. PM> Add-Migration f -v Using project 'CrudEntityFramework'. Using startup project 'CrudEntityFramework'. Build started... Build succeeded. C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\3.1.9\tools\netcoreapp2.0\any\ef.dll" migrations add f --json --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist

pmcastillo79 commented 3 years ago

I updated to EF 5.0.0-rc.2.20475.6 RC and the error continue.

PM> Add-Migration f -v Using project 'CrudEntityFramework'. Using startup project 'CrudEntityFramework'. Build started... Build succeeded. C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\5.0.0-rc.2.20475.6\tools\netcoreapp2.0\any\ef.dll" migrations add f --json --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist

davkean commented 3 years ago

@pmcastillo79 Can you share a repro project/solution?

pmcastillo79 commented 3 years ago

@pmcastillo79 Can you share a repro project/solution?

@davkean

sure

is here

https://github.com/pmcastillo79/EFCoreTestTutorial

PD: The Migration folder was created using the commands outside the visual studio, the problem is inside the visual studio command prompt.

if you use dotnet-ef commands works. But is outside the visual studio IDE.

error add-migration cmd

pmcastillo79 commented 3 years ago

/cc @lifengl

pmcastillo79 commented 3 years ago

@davkean @bricelam @lifengl I can gave you remote access to my computer if you want so you can check some enviroment values. I want to solve this problem.

FreshPrinceMayo commented 3 years ago

I'm experiencing the same issue

Ran this command on the command line:

dotnet ef dbcontext scaffold "Server=localhost;Database=DevOps;Integrated security=SSPI;Trusted_Connection=True;MultipleActiveResultSets=true" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Model -Force

image

Get this output:

The specified deps.json [C:\WORK\Repos\Titan\src\bin\Debug\netcoreapp3.1\Persistence.MsSql.deps.json] does not exist

As a workaround I created a console application generated the files copied them to my project and changed the namespace

bwjunkie commented 3 years ago

Workaround: Even when the CLI is broken showing this error, I've had some success if I add the EF Design NuGet package first into the project and try then. It's possible the sequence in which you add the various EF NuGet and attempt a Scaffold will help out (as lame as that is) .

bwjunkie commented 3 years ago

Triage: closing this here as a problem has been reported to VS and there is nothing actionable on the EF side at this point. We can re-open if the situation changes.

Scaffolding DB First is major functionality, please re-open even if the EF core team cannot take action.

bricelam commented 3 years ago

@bwjunkie I think you're hitting a different error. Could you submit a new issue with a repro project attached?

Hoopie commented 3 years ago

I had this issue today, could not run my db tests.

the issue/fix for me was: the sln configuration was in Release mode which this project is NOT not built under. Switched back to Debug, clean, rebuild

resharper test session is now running fine!

The deps.json does not exit error really threw me. turns out the issue was very simple abit not clear.

bwjunkie commented 3 years ago

@bwjunkie I think you're hitting a different error. Could you submit a new issue with a repro project attached? @bricelam sure, its the same output others have posted. but here ya go... (on this test repo the CLI is working but not PM) https://github.com/dotnet/efcore/issues/23300

nbelley commented 3 years ago

I'm also hitting this problem on the latest vs (16.8.1) as of today. I started a whole new .net core 5 project and I can't use EF core... Is there a workaround? The only solution I found was to copy all my bin\debug folder into the root folder of the solution each time I build, which kind of sucks.

nbelley commented 3 years ago

To provide an update... The .NET project system team thinks this is caused by either a corrupted solution file or by having an invalid Active solution configuration selected.

image

We've updated the error in EF Core 5.0 to provide more details and hopefully get to the bottom of this.

Is this serious? The problem happens when I do New Project, add EF, then it happens. How is this a corruption???

alwilton commented 3 years ago

For everyone with the problem posted here I would encourage you to see my link here and try the test presented. https://developercommunity.visualstudio.com/content/problem/1061310/project-configuration-manager-properties-is-blank-1.html. Even though this heavily effects some of us with EF there is more to it. I would like to confirm my strong belief that the problem presented here is caused by VS itself and the EF issue is just one of many results of the underlying VS problem. Please try the test and if you are affected please upvote the issue presented. BTW if you have this issue the only work around is to use the EF Command Line Interface (CLI).

ElectricalSt0rm commented 3 years ago

I had the same error when the project was on my NAS. The build succeeded with no errors after I moved the project to my local drive.

shrimantpatel commented 3 years ago

I had the same error when the project was on my NAS. The build succeeded with no errors after I moved the project to my local drive.

Thx this fixed all my worries, the moment I copied my project to a local drive, problem solved, earlier it was in a network share.

Northgates-Systems commented 3 years ago

@pmcastillo79 Can you share a repro project/solution?

@davkean

sure

is here

https://github.com/pmcastillo79/EFCoreTestTutorial

PD: The Migration folder was created using the commands outside the visual studio, the problem is inside the visual studio command prompt.

if you use dotnet-ef commands works. But is outside the visual studio IDE.

error add-migration cmd

I have the same problem. My user temp and my blazor webassy asp.net core hosted are on the D: drive

nbelley commented 3 years ago

So, what should I do? Stop using migrations? I have no idea what to do. I had that problem in another project and I copied all the bin into the root folder of the project each time I had to do anything in the package manager console. I started a NEW PROJECT and I also have the problem... I don't know what to do? Go back to the real .net framework (4.8)? I mean, I have the impression I'm using something that's not mature and many years behind EF for the 4.8 framework!!!

nbelley commented 3 years ago

Here is what I do, using visual studio 2019 16.8.2:

  1. Created a new solution
  2. .net Core 5 library
  3. added a class called Blog (like in the tutorial: https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=vs)
  4. installed the tools from the nuget packager console: Install-Package Microsoft.EntityFrameworkCore.Tools
  5. then ran the initial command: Add-Migration InitialCreate

And bam:

Clipboard01

Please don't tell me this is normal, that my solution file is corrupted or that my build configuration is broken. It does that with a clean new project.

ErikEJ commented 3 years ago

@nbelley Try to move your code / project to the c: drive

nbelley commented 3 years ago

@nbelley Try to move your code / project to the c: drive

@ErikEJ Same thing:

sadfdsa

NotNikita commented 3 years ago

Here is what I do, using visual studio 2019 16.7.5:

  1. Creating New Web MVC app With Individual User Acc Auth
  2. Adding new Scaffolded Item
  3. Trying to "Update-Database" in PMC

And result: image

NotNikita commented 3 years ago

@nbelley Try to move your code / project to the c: drive

@ErikEJ Same thing:

sadfdsa

Have you solved this issue?

pasayazici commented 3 years ago
  1. dotnet tool uninstall --global dotnet-ef
  2. dotnet tool install --global dotnet-ef
  3. dotnet ef (This is only to check that "DOTNET EF" is installed correctly.)
  4. dotnet ef migrations --project YourProject.Data --startup-project YourProject.UI add InitialCreate
  5. dotnet ef database --project YourProject.Data --startup-project YourProject.UI update
ernkz commented 3 years ago

Install-Package Microsoft.EntityFrameworkCore.Tools