Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Adding a new migration leads to InvalidOperationException #2853


User avatar
0
ruffzy created

I am using the new angular 2 / asp.net core project with VS 2017 update 1 . After I have added some new entities I wanted to create a new migration as described in the documentation with the following command:

dotnet ef migrations add "created_new_BM_entities"

Unfortunately the dotnet-ef.exe crashes with the following exception:

PM> dotnet ef migrations add "created_new_BM_entities"
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.
  enio.Web_Manager.Core -> D:\enio_git\bm.WebHub\aspnet-core\src\enio.Web_Manager.Core\bin\Debug\net461\enio.Web_Manager.Core.dll
  enio.Web_Manager.EntityFramework -> D:\enio_git\bm.WebHub\aspnet-core\src\enio.Web_Manager.EntityFramework\bin\Debug\net461\enio.Web_Manager.EntityFramework.exe
Build succeeded.
    0 Warning(s)
    0 Error(s)
Time Elapsed 00:00:02.32

Unbehandelte Ausnahme: System.InvalidOperationException: Could not invoke tool dotnet-ef.
   bei Microsoft.Extensions.Internal.DotnetToolDispatcher.EnsureValidDispatchRecipient(String[]& programArgs, String toolName)
   bei Migrator.EF6.Tools.Program.Main(String[] args)

Can you please explain what I am doing wrong here?

kind regards, marco


2 Answer(s)
  • User Avatar
    0
    ruffzy created

    the answer can be found here: <a class="postlink" href="http://stackoverflow.com/questions/43192276/unhandled-exception-when-creating-new-migration-with-ef-6/">http://stackoverflow.com/questions/4319 ... with-ef-6/</a>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for sharing the answer as well :).