如何通过c#访问包管理器控制台 [英] How to access package manager console through c#

查看:326
本文介绍了如何通过c#访问包管理器控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个用户界面,通过该界面可以将Nuget power shell脚本发送到Package Manager控制台并获取UI中显示的输出。为此,我需要有关如何通过c#访问包管理器控制台的信息。

任何人都可以帮我吗?

提前谢谢。

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.

推荐答案

您好Narendra_kvs,

您是否获得了任何查询解决方案?因为我也有同样的要求。如果您有任何解决方案,请在同一个主题上告诉我。谢谢。
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.


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);


这篇关于如何通过c#访问包管理器控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆