Closed aevitas closed 2 years ago
almost same problem for me! { "dependencies": { "Microsoft.AspNetCore.Diagnostics": "1.1.0", "Microsoft.AspNetCore.Mvc": "1.1.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", "Microsoft.AspNetCore.StaticFiles": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final", "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", "Microsoft.Extensions.Logging.Console": "1.1.0", "Microsoft.NETCore.App": "1.1.0" },
"tools": { "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview4-final", "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview4-final" },
try this:
"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
},
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
},
EF Core 1.1 cannot run dotnet ef commands after fixing recommended changes cannot run add-migrations
"version": "1.1.0-*",
"dependencies": {
"DevExtreme.AspNet.Mvc": "16.2.1",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Routing.Abstractions": "1.1.0",
"Microsoft.AspNetCore.Razor": "1.1.0",
"Microsoft.AspNetCore.Mvc.ViewFeatures": "1.1.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.1.0-preview4-final",
"type": "build"
},
"Microsoft.AspNetCore.Mvc.DataAnnotations": "1.1.0",
"Microsoft.AspNetCore.Mvc.Formatters.Json": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
},
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.Relational": "1.1.0",
"Microsoft.EntityFrameworkCore.Relational.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final",
"DX.JavaScript.WebAPI.Client": "1.0.0.10",
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
"LinqKit.Microsoft.EntityFrameworkCore": "1.1.9"
},
"tools": {
"BundlerMinifier.Core": "2.2.306",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final",
// "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
},
"frameworks": {
"netcoreapp1.1": {
"imports": [ "dnxcore50", "net461", "dotnet" ] //dotnet //dnxcore50
}
},
"buildOptions": {
// "debugType": "portable",
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"prepublish": [ "bower install", "dotnet bundle" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
@aevitas This looks like a dupe of #7077
@modestob what error are you seeing?
I could not use dotnet.ef commands
I tried Rowan's suggestions and now it works used "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview3-final", saw it in another thread.... Thank you bricelam for the follow up
@bricelam you meant to close this too?
@bricelam Yes, I agree it's the same issue. Thanks for the follow up!
I'm assuming you meant to close this issue, so I'll do it and keep track #7077
Steps to reproduce
Create an ASP.NET Core project, add entity framework and define the following runtime in the
project.json
file:The issue
When running EF commands such as
Add-Migration
andUpdate-Database
after defining a model, data context and everything required, the following error is provided:While the binaries generated at compile time are located in
Z:\ryder\src\Ryder\bin\Debug\netcoreapp1.1\win10-x64
This means one has to continuously copy the contents of the
win10-x64
directory up one directory in order for EF commands to run properly, which becomes tedious after a while.Further technical details
EF Core version: 1.1 Operating system: Windows 10 x64 Visual Studio version: (e.g. VS 2013 or n/a): VS 2k15
Other details about my project setup:
My
project.json
looks as follows:I'm assuming this issue is with EF and not .NET Core, though I'm not entirely sure. The code won't compile without a runtime defined.
Has anyone else run into this issue with EF Core 1.1?