Why am I getting a contentRootPath null exception when attempting to add a database migration in...
up vote
1
down vote
favorite
I have a .NET Core class library that is the data access layer for multiple web applications. I am using Entity Framework Core 1.1, but I'm having trouble with migrations through PMC. My initial migration worked successfully, but after updating the database and re-launching VS 2017 I get a null exception on the contentRootPath argument when attempting to migrate. I may have made some changes to the project after my successful migration, but I don't remember what they were. This is the error and stack trace:
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFrameworkAdd-Migration' for Entity Framework 6.
System.ArgumentNullException: Value cannot be null.
Parameter name: contentRootPath
at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations..ctor(IOperationReporter reporter, Assembly assembly, Assembly startupAssembly, String environment, String projectDir, String contentRootPath, String rootNamespace)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__4()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
There is no config file in my migrations directory, and I can't find anything related in the DbContext class. Has anyone else ran into this issue, or know what is causing it?
SqlDbContext class:
using Microsoft.EntityFrameworkCore;
using DataLayer.Models.User;
namespace DataLayer.Context
{
public class SqlDbContext : DbContext
{
public DbSet<User> Users { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(MyDbConfig.SqlConnectionString);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>()
.Ignore(m => m.FullName);
base.OnModelCreating(modelBuilder);
}
}
}
c# .net orm entity-framework-core
|
show 1 more comment
up vote
1
down vote
favorite
I have a .NET Core class library that is the data access layer for multiple web applications. I am using Entity Framework Core 1.1, but I'm having trouble with migrations through PMC. My initial migration worked successfully, but after updating the database and re-launching VS 2017 I get a null exception on the contentRootPath argument when attempting to migrate. I may have made some changes to the project after my successful migration, but I don't remember what they were. This is the error and stack trace:
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFrameworkAdd-Migration' for Entity Framework 6.
System.ArgumentNullException: Value cannot be null.
Parameter name: contentRootPath
at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations..ctor(IOperationReporter reporter, Assembly assembly, Assembly startupAssembly, String environment, String projectDir, String contentRootPath, String rootNamespace)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__4()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
There is no config file in my migrations directory, and I can't find anything related in the DbContext class. Has anyone else ran into this issue, or know what is causing it?
SqlDbContext class:
using Microsoft.EntityFrameworkCore;
using DataLayer.Models.User;
namespace DataLayer.Context
{
public class SqlDbContext : DbContext
{
public DbSet<User> Users { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(MyDbConfig.SqlConnectionString);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>()
.Ignore(m => m.FullName);
base.OnModelCreating(modelBuilder);
}
}
}
c# .net orm entity-framework-core
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a .NET Core class library that is the data access layer for multiple web applications. I am using Entity Framework Core 1.1, but I'm having trouble with migrations through PMC. My initial migration worked successfully, but after updating the database and re-launching VS 2017 I get a null exception on the contentRootPath argument when attempting to migrate. I may have made some changes to the project after my successful migration, but I don't remember what they were. This is the error and stack trace:
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFrameworkAdd-Migration' for Entity Framework 6.
System.ArgumentNullException: Value cannot be null.
Parameter name: contentRootPath
at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations..ctor(IOperationReporter reporter, Assembly assembly, Assembly startupAssembly, String environment, String projectDir, String contentRootPath, String rootNamespace)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__4()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
There is no config file in my migrations directory, and I can't find anything related in the DbContext class. Has anyone else ran into this issue, or know what is causing it?
SqlDbContext class:
using Microsoft.EntityFrameworkCore;
using DataLayer.Models.User;
namespace DataLayer.Context
{
public class SqlDbContext : DbContext
{
public DbSet<User> Users { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(MyDbConfig.SqlConnectionString);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>()
.Ignore(m => m.FullName);
base.OnModelCreating(modelBuilder);
}
}
}
c# .net orm entity-framework-core
I have a .NET Core class library that is the data access layer for multiple web applications. I am using Entity Framework Core 1.1, but I'm having trouble with migrations through PMC. My initial migration worked successfully, but after updating the database and re-launching VS 2017 I get a null exception on the contentRootPath argument when attempting to migrate. I may have made some changes to the project after my successful migration, but I don't remember what they were. This is the error and stack trace:
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFrameworkAdd-Migration' for Entity Framework 6.
System.ArgumentNullException: Value cannot be null.
Parameter name: contentRootPath
at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations..ctor(IOperationReporter reporter, Assembly assembly, Assembly startupAssembly, String environment, String projectDir, String contentRootPath, String rootNamespace)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__4()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
There is no config file in my migrations directory, and I can't find anything related in the DbContext class. Has anyone else ran into this issue, or know what is causing it?
SqlDbContext class:
using Microsoft.EntityFrameworkCore;
using DataLayer.Models.User;
namespace DataLayer.Context
{
public class SqlDbContext : DbContext
{
public DbSet<User> Users { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(MyDbConfig.SqlConnectionString);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>()
.Ignore(m => m.FullName);
base.OnModelCreating(modelBuilder);
}
}
}
c# .net orm entity-framework-core
c# .net orm entity-framework-core
edited Jun 23 '17 at 2:08
asked Jun 22 '17 at 5:06
dzlp
167
167
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18
|
show 1 more comment
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18
|
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
It turns out that this was due to the Microsoft.EntityFrameworkCore.Tools
package being pre-release version 2.0.0, which is not currently a stable version. Downgrading to 1.1.1 fixed the issue.
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
add a comment |
up vote
1
down vote
I had this issue in the past and here is the fix:
First, make sure that the version of the SDK you are using is 2.1.200 as you are under Core 1.1 and put this on your global.json:
{
"sdk": {
"version": "2.1.200"
}
}
Add reference on your .csproj to Microsoft.EntityFrameworkCore.Design
and Microsoft.EntityFrameworkCore.Tools.DotNet
so you will have:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"
Version="1.1.6"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.1.6" />
</ItemGroup>
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It turns out that this was due to the Microsoft.EntityFrameworkCore.Tools
package being pre-release version 2.0.0, which is not currently a stable version. Downgrading to 1.1.1 fixed the issue.
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
add a comment |
up vote
1
down vote
accepted
It turns out that this was due to the Microsoft.EntityFrameworkCore.Tools
package being pre-release version 2.0.0, which is not currently a stable version. Downgrading to 1.1.1 fixed the issue.
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It turns out that this was due to the Microsoft.EntityFrameworkCore.Tools
package being pre-release version 2.0.0, which is not currently a stable version. Downgrading to 1.1.1 fixed the issue.
It turns out that this was due to the Microsoft.EntityFrameworkCore.Tools
package being pre-release version 2.0.0, which is not currently a stable version. Downgrading to 1.1.1 fixed the issue.
edited Sep 1 '17 at 16:59
Brian Ogden
10.4k457110
10.4k457110
answered Jun 23 '17 at 2:20
dzlp
167
167
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
add a comment |
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Are you sure that you do not mean 1.0.1?
– Brian Ogden
Sep 1 '17 at 16:55
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
Yeah, it was 1.1.1 that worked for me.
– dzlp
Sep 1 '17 at 16:58
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
There is no 1.1.1 version though
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
Oh ok, nevermind
– Brian Ogden
Sep 1 '17 at 16:59
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
I removed my edits
– Brian Ogden
Sep 1 '17 at 17:00
add a comment |
up vote
1
down vote
I had this issue in the past and here is the fix:
First, make sure that the version of the SDK you are using is 2.1.200 as you are under Core 1.1 and put this on your global.json:
{
"sdk": {
"version": "2.1.200"
}
}
Add reference on your .csproj to Microsoft.EntityFrameworkCore.Design
and Microsoft.EntityFrameworkCore.Tools.DotNet
so you will have:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"
Version="1.1.6"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.1.6" />
</ItemGroup>
add a comment |
up vote
1
down vote
I had this issue in the past and here is the fix:
First, make sure that the version of the SDK you are using is 2.1.200 as you are under Core 1.1 and put this on your global.json:
{
"sdk": {
"version": "2.1.200"
}
}
Add reference on your .csproj to Microsoft.EntityFrameworkCore.Design
and Microsoft.EntityFrameworkCore.Tools.DotNet
so you will have:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"
Version="1.1.6"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.1.6" />
</ItemGroup>
add a comment |
up vote
1
down vote
up vote
1
down vote
I had this issue in the past and here is the fix:
First, make sure that the version of the SDK you are using is 2.1.200 as you are under Core 1.1 and put this on your global.json:
{
"sdk": {
"version": "2.1.200"
}
}
Add reference on your .csproj to Microsoft.EntityFrameworkCore.Design
and Microsoft.EntityFrameworkCore.Tools.DotNet
so you will have:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"
Version="1.1.6"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.1.6" />
</ItemGroup>
I had this issue in the past and here is the fix:
First, make sure that the version of the SDK you are using is 2.1.200 as you are under Core 1.1 and put this on your global.json:
{
"sdk": {
"version": "2.1.200"
}
}
Add reference on your .csproj to Microsoft.EntityFrameworkCore.Design
and Microsoft.EntityFrameworkCore.Tools.DotNet
so you will have:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"
Version="1.1.6"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.1.6" />
</ItemGroup>
answered Nov 21 at 20:52
YManaf
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44690559%2fwhy-am-i-getting-a-contentrootpath-null-exception-when-attempting-to-add-a-datab%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you using both EF6 and EFC?
– mvermef
Jun 22 '17 at 5:53
No, I am not using EF6, but it is in the project.
– dzlp
Jun 22 '17 at 19:03
I edited your tags... to only show EFC. Can you show us your references? Startup.cs and appsettings.json
– mvermef
Jun 22 '17 at 19:52
It's in a Class Library, so there is no Startup.cs or appsettings.json files. I am just storing my connection string in a static class, along with connection strings to other databases that I am accessing. I updated the code snipped with my references. And my mistake before, I meant that EF6 is in the solution, not the project.
– dzlp
Jun 23 '17 at 2:08
I just looked at my Nuget packages, and for some reason my EntityFrameworkCore.Tools package was a pre-release version (2.0.0). I just downgraded to 1.1.1, and now migrations are working again. Not sure why it updated to an unstable version, but it's working now. Thanks anyway for you help!
– dzlp
Jun 23 '17 at 2:18