dotnet exec needs a managed .dll or .exe extension while adding Entity Framework Core (1.1.0) Migrations

大城市里の小女人 提交于 2019-12-07 14:37:24

问题


Error Message:

PM> Add-Migration InitialDatabase
dotnet exec needs a managed .dll or .exe extension. The application specified was 'C:\Users\xxxxxx\documents\visual studio 2017\Projects\TheWorld\src\TheWorld\bin\Debug\netcoreapp1.0\TheWorld.runtimeconfig.json'
Process finished with non-zero exit code
PM> 

Visual Studio Version: 2017 RC

Project Dependencies :

Error Screenshot :


回答1:


I had the same problem. The only thing I had to do is changing the Target Framework in the Project properties.

Changing the framework version

I hope this helps.




回答2:


In VS2017RC - All I had to do was install .NetCore again using Package Manager Console:

Install-Package Microsoft.NETCore.App

Later migration script worked and "dotnet exec needs a managed .dll or .exe extension." error went away.




回答3:


Tooling for VS and dotnet are still in preview. Try run dotnet ef migrations add InitialDatabase from command line in TheWorld/src folder.



来源:https://stackoverflow.com/questions/41257062/dotnet-exec-needs-a-managed-dll-or-exe-extension-while-adding-entity-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!