在Visual Studio中使用命令窗口 [英] Using the Command Window in Visual Studio

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

问题描述

我想按照这个演练:

在Windows服务

截至此步骤:

第六步:安装Windows服务在此步骤中,您安装
Windows服务,并从服务控制台运​​行

Step 6: Install the Windows Service In this step, you install the Windows service and run it from the Services console.


  1. 重新生成解决方案,并打开一个Visual Studio命令提示符。

  2. 浏览到WindowsService1.exe位于项目的bin目录下。

  3. 运行以下命令来安装该服务:

Installutil WindowsService1.exe

Installutil WindowsService1.exe

我从来没有使用VS命令之前提示。我怎么也数2的浏览到WindowsService1.exe位于项目的bin目录的结果
我怎么了>后键入?; 结果
使用普通的命令行语法像 CD 不工作,所以我怎么浏览来使用这个工具的位置?例如,如果我键入此在命令窗口中光盘。C:\返回命令CD是无效

I've never used VS Command Prompt before. How do I do number 2 Browse to the bin directory of the project where WindowsService1.exe is located ?
What do I type in after the >
Using normal command line syntax like cd doesn't work so how do I browse to a location using this tool? For example if I type this into the Command Window cd "C:\" it returns Command "cd" is not valid.

修改
嗯发现的东西...的 MSDN

推荐答案

CD 确实的工作。但是,请记住,如果你想获得的路径中有空格,则需要围绕它(路径)的报价。例如:

cd does work. However, keep in mind that if the path you're trying to get to has spaces, you need quotes around it (the path). E.g.:

cd "C:\Program Files\Microsoft Visual Studio 10.0"

此外,注意Visual Studio中的命令提示符的,也就是在第6步提的是不会在Visual Studio中的命令窗口的 - 我认为这是问题的来源。该命令的提示的是一个单独的可执行文件,您可以通过单击开始,指向所有程序,指向Microsoft Visual Studio中,指向Visual Studio工具开始,然后单击Visual Studio命令提示符。或者,只是搜索Visual Studio的在开始菜单的搜索栏,它应该显示出来。

Also, note that the "Visual Studio command prompt" that is mentioned in Step 6 is not the "Visual Studio Command Window" - I think this is where the problem comes from. The command prompt is a separate executable that you can start by clicking Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt. Alternatively, just search "Visual Studio" in the search bar in the Start menu, and it should show up

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

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