0

I've a VSTO - AddIn project developed using VS2015-Update3. I'm trying to implement a Database functionality in the project and for that I'm implementing EF Core. I'm using the following official MSDN tutorial. But I'm getting the above error when I run the command dotnet ef migrations add MyFirstMigration.

Please Note:

  1. VSTO-AddIn projects do not have a project.json file.
  2. VSTO projects use Full .NET framework (I'm using .NET 4.6.2). But, as explained here, one can use EF Core in a Full .NET framework.
Community
  • 1
  • 1
nam
  • 21,967
  • 37
  • 158
  • 332
  • 1) What is your dotnet SDK version (run `dotnet --version`)? 2) Do you have `Microsoft.EntityFrameworkCore.Tools.DotNet` package installed/added to project (and what version)? – Dmitry Dec 29 '16 at 09:03
  • @Dmitry 1) dotnet SDK version is: `1.0.0-preview2-003131` 2) I get the error: `Install-Package : Unable to find package 'Microsoft.EntityFrameworkCore.Tools'` – nam Dec 29 '16 at 16:13
  • Lack of package is reason for error. You need `...Tools` package for [package manager commands](https://learn.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell) or `...Tools.DotNet` to run `dotnet ef ...` from command line. Check you package source configuration - both packages [are listed on nuget](https://www.nuget.org/packages?q=Microsoft.EntityFrameworkCore.Tools) – Dmitry Dec 29 '16 at 21:12
  • @Dmitry Is there something from your link for [package manager commands] they I need to install. Because I get the same error as above when trying to install `...Tools.DotNet` or `....Tools`. – nam Dec 30 '16 at 01:36
  • You need at least one of this packages - they contains migration tools you ask for. You need to solve problem "Unable to find..." in your project, because this packages are listed on NuGet. – Dmitry Dec 30 '16 at 11:39

0 Answers0