在添加Entity Framework Core(1.1.0)迁移时,dotnet exec需要托管的.dll或.exe扩展

错误信息:

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版本:2017 RC

项目依赖性:

项目依赖性

错误截图: 错误截图

我有同样的问题。 我唯一要做的就是更改Project属性中的Target Framework。

更改框架版本

我希望这有帮助。

在VS2017RC中 – 我所要做的就是使用Package Manager Console再次安装.NetCore:

 Install-Package Microsoft.NETCore.App 

后来的迁移脚本工作,“dotnet exec需要一个托管的.dll或.exe扩展名”。 错误消失了。

VS和dotnet的工具仍在预览中。 尝试运行dotnet ef migrations add InitialDatabaseTheWorld/src文件夹中的命令行dotnet ef migrations add InitialDatabase