Share via

How run “Package Manager Console” commands programmatically in .Net 5?

Freddy Ullrich 1 Reputation point
2021-06-07T09:02:41.503+00:00

I want to run commands like "update-database" (normally done in Package Manager Console) using c# code, how is it possible? Note: I'm using .net 5, and the solution to this problem may be different from older .net versions.
I also posted here: https://stackoverflow.com/questions/67673765/how-run-package-manager-console-commands-programmatically-in-net-5

Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,201 Reputation points Microsoft External Staff
    2021-06-08T07:47:08.523+00:00

    Hi @Freddy Ullrich ,

    Welcome to Microsoft Q&A!

    According to your description, could you tell me if you are using Entity Framework?
    If you are using Entity Framework, it is not supported in here and please report the issue to GitHub: https://github.com/dotnet/efcore/issues.

    Sincerely,
    Anna

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.