Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to develop a user interface through which one can send Nuget power shell scripts to the Package manager console and get the output displayed in UI. For that i need information on how to access package manager console through c#.
Can any one help me on this?
Thanks in advance.
Posted
Updated 7-Apr-19 22:33pm
Comments
Kornfeld Eliyahu Peter 27-Nov-13 5:56am    
NuGet's package menegment consol is a console INSIDE Visual Studio!
You can not access it from you app...

Hi Narendra_kvs,
Did you get any solution for your query? As I have also the same requirement. If you have got any solution please let me know on the same thread. Thanks.
 
Share this answer
 
EnvDTE.DTE _ObjDTE;
_ObjDTE = (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE");
      var script = "Get-Package | Select-Object Id, LicenseUrl";
      _ObjDTE.ExecuteCommand("View.PackageManagerConsole", script);
 
Share this answer
 
Comments
Dave Kreskowiak 8-Apr-19 8:58am    
If the user, 6 years ago, was writing their own IDE, why on earth would you require the user to install Visual Studio to use it?

The console inside Visual Studio is no different from a Powershell window. So why force the requirement of the DTE object library on it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900