Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 :

Project Dependencies

Error Screenshot : Error Screenshot

like image 663
bigyanshr Avatar asked Mar 10 '23 08:03

bigyanshr


2 Answers

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.

like image 120
Rudie Heijnen Avatar answered Mar 25 '23 18:03

Rudie Heijnen


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.

like image 27
Shiju Narayan Avatar answered Mar 25 '23 18:03

Shiju Narayan