2017-02-23 49 views
0

我得到一個類似的問題,這個帖子:入口點在裝配沒有發現「Microsoft.EntityFrameworkCore.Design,版本= 1.1.0.0

Entry point not found in assembly 'Microsoft.EntityFrameworkCore.Design - dotnet.exe crashes

我已經創建了一個Asp.Net核心MVC應用程序和project.json看起來是這樣的:

{ 

    "dependencies": { 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.1.0-preview4-final", 
     "type": "build" 
    }, 

    "Microsoft.EntityFrameworkCore.Design": { 
     "version": "1.1.0", 
     "type": "build" 
    }, 

    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "RealEstateCoreApplication.DB": "1.0.0-*", 
    "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Mvc": "1.1.1", 
    "Microsoft.AspNetCore.Routing": "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.SqlServer.Design": "1.1.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", 
    "Microsoft.Extensions.Configuration.Json": "1.1.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "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.NETCore.App": "1.1.0", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0", 
    "BundlerMinifier.Core": "2.3.327" 
    }, 

    "tools": { 
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": [ 
     "portable-net45+win8+dnxcore50", 
     "portable-net45+win8" 
     ] 
    }, 

    "Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final", 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": [ 
     "portable-net45+win8" 
     ] 
    } 
    }, 

    "frameworks": { 
    "netcoreapp1.0": { 
     "imports": [ 
     "dotnet5.6", 
     "portable-net45+win8" 
     ] 
    } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "runtimeOptions": { 
    "configProperties": { 
     "System.GC.Server": true 
    } 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "**/*.cshtml", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "bower install", "dotnet bundle" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    }, 
    "runtimes": { 
    "win7-x64": {} 
    } 
} 

我已經嘗試了一堆東西,但不能設置命令:「DOTNET EF數據庫更新-c IdentityDb」在命令窗口中工作(IdentityDb替換默認應用上下文)。只是不斷崩潰說:在程序集中找不到入口點'Microsoft.EntityFrameworkCore.Design,版本= 1.1.0.0

+0

您是否碰巧找到解決方案?當我嘗試運行這個時,確切的事情正在發生。 – BHubbard

回答

0

我跑了同樣的問題,經過幾次測試,我找到了解決方案。 這裏我project.json

"dependencies": { 
"Microsoft.AspNetCore.Authentication.Cookies": "1.1.1", 
"Microsoft.AspNetCore.Diagnostics": "1.1.1", 
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.1", 
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.1", 
"Microsoft.AspNetCore.Mvc": "1.1.2", 
"Microsoft.AspNetCore.Routing": "1.1.1", 
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.1", 
"Microsoft.AspNetCore.Server.Kestrel": "1.1.1", 
"Microsoft.AspNetCore.StaticFiles": "1.1.1", 
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.1", 
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.1", 
"Microsoft.EntityFrameworkCore.Design": "1.1.1", 
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final", 
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.1", 
"Microsoft.Extensions.Configuration.Json": "1.1.1", 
"Microsoft.Extensions.Configuration.UserSecrets": "1.1.1", 
"Microsoft.Extensions.Logging": "1.1.1", 
"Microsoft.Extensions.Logging.Console": "1.1.1", 
"Microsoft.Extensions.Logging.Debug": "1.1.1", 
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.1", 
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0", 
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.1.0-preview4-final", 
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.1.0", 
"Microsoft.NETCore.App": "1.1.1"}, 

"buildOptions": { 
"emitEntryPoint": true, 
"preserveCompilationContext": true}, 

"frameworks": { 
"netcoreapp1.1": { 
    "imports": [ 
    "dotnet5.6", 
    "portable-net45+win8"]}}, 

"tools": { 
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", 
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
    "version": "1.1.0-preview4-final", 
    "imports": [ 
    "portable-net45+win8" 
    ] 
}, 
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"} 

爲了得到它解決了,你應該升級到.NET 1.1的核心

在依賴改變Microsoft.NETCore.App到1.1.1,並在框架部分的netcoreapp1。 0引用將需要改變,以netcoreapp1.1

重要:這些工具包的名稱已經從Microsoft.EntityFrameworkCore.Tools改爲Microsoft.EntityFrameworkCore.Tools.Dotnet

請同時參閱這http://bencoleman.co.uk/dotnet-core-1-1-gotchas/

我也升級的NuGet 3.5 Nuget

我希望的版本,它會幫助你。 親切的問候

相關問題