-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run dotnet ef migration add #7557
Comments
Possibly related to #7078. @leolorenzoluis can you share a project that reproduces the issue |
Work around is to use version 1.0.2 of the EntityFrameworkCore packages. Then it does not link the designer file to the root. The following config allowed me to create the migrations: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.0.2" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
</ItemGroup>
</Project> |
External issue: dotnet/corefx#15031 |
@bricelam should this be closed on our side now? |
I think so, but it's also another scenario we can use to verify #7078 |
I am still getting a similar issue. Here is my .csjproj with all of my relevant version information.
Here is the output from Package Manager Console.
|
@agatlin Update the Microsoft.EntityFrameworkCore.Tools.DotNet package to version 1.0.1. |
@bricelam Thank you Brice. I found the issue. When creating a .NET Core project in VS2017, the project is one directory lower than the solution. However, when you attempt to run any command in Package Manager Console, it runs those commands at the solution directory level. I just did a "cd and then everything went fine. I think Microsoft should put this requirement in big bold letters everywhere they mention running anything with "dotnet ef ..." Thanks again for your help. |
Thank you very much bricelam! |
@bricelam you've saved my day. |
Updating the version of |
I'm getting this error for .NET Core 2.0 |
I was able to resolve this error by adding "GenerateRuntimeConfigurationFiles" to the csproj file.
|
Running
dotnet ef migration add
causes errorFurther technical details
EF Core version: 1.1.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Win 10
IDE: VS 2017
The text was updated successfully, but these errors were encountered: