在Visual Studio中使用命令行 [英] Using the command line from within Visual Studio

查看:169
本文介绍了在Visual Studio中使用命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Visual Studio中有一个工具窗口,允许我在当前项目的工作目录中键入命令行内容(例如git stashnpm install等).类似于在Eclipse中.

I'd like to have a tool window in Visual Studio that allows me to type command line things (e.g. git stash, npm install, etc.) in the current project's working directory. Something like this in Eclipse.

我在任何菜单中都找不到任何这样的选项,但诚然,它们是迷宫式的.我尝试浏览Visual Studio画廊,但也没有骰子.任何扩展或隐藏的选项都会给我这个?

I can't find any such option in any of the menus, but admittedly they're labyrinthine. I tried looking through the Visual Studio gallery, but no dice either. Any extension or hidden option that would give me this?

PowerShell可能也可以工作,因为据我了解,这是常规shell的超集.

PowerShell would probably also work, as from what I understand that's a superset of the regular shell.

推荐答案

在Visual Studio 11中,NuGet程序包管理器控制台是功能齐全的PowerShell控制台.您可以在那里执行各种操作,包括文件系统操作,git/hg/svn/tfs命令等.

In Visual Studio 11, the NuGet Package Manager Console is a fully featured PowerShell console. You can do all kinds of things there, including file system operations, git/hg/svn/tfs commands, etc.

您还可以使用名为NuGet_profile.ps1的特殊PowerShell配置文件来自定义体验.

You also can customize the experience with a special PowerShell profile called NuGet_profile.ps1.

如果我没有记错的话,从Visual Studio库中安装NuGet VSIX可以在VS2010中获得类似的体验.

Installing the NuGet VSIX from the Visual Studio gallery will get you a similar experience in VS2010 if I'm not mistaken.

这篇关于在Visual Studio中使用命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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