My specific problem is how I can automate add-migration during the build process for the Entity Framework. When exploring this, it seems that the most likely approach is something like automating these steps.
- Open the solution in Visual Studio 2013
- Run "Add-Migration blahblah" in the package manager console (most likely using the extension extension)
- Close the solution
This initial approach is based on my own research and on this issue , the powershell script ultimately requires quite a few tweaks to start-up migration, Visual Studio automatically does this when creating the package manager console and creating the DTE object. I would rather not try to duplicate this setting outside of Visual Studio.
One possible way to solve is an incomplete stack overflow question
When exploring the NuGet API, it does not seem to have βsending this text, and it will run as if it were entered into the console.β I don't understand what Visual Studio vs NuGet is, so I'm not sure if that is what would be there.
I can easily find the "Pacakage Manager Console" through the "$ dte.Windows" command in the package manager console, but in the VS 2013 window this collection gives me objects that are "Microsoft.VisualStudio.Platform. WindowManagement.DTE.WindowBase". If it has style text, I think I need it to be NuGetConsole.Implementation.PowerConsoleToolWindow "by looking at the source code I donβt understand how the text will be filled, but I am not at all familiar with what I see.
In the worst case, I will return to try to impose keys on it in accordance with this issue , but would prefer not to do this, as this will significantly complicate the automation of the environment the assembly process.
All said
- Is it possible to pass commands through code to the package manager console in Visual Studio, which is fully initialized and can support the add-redirect command in the Entity Framework?
Thanks for any suggestions, tips, help, not abuse in advance,
John
source share