Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using the Command Window in Visual Studio

I'm trying to follow this walk-through:

Hosting a WCF in a Windows Service

Up to this step:

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

  1. Rebuild the solution and open a Visual Studio command prompt.
  2. Browse to the bin directory of the project where WindowsService1.exe is located.
  3. Run the following command to install the service:

Installutil WindowsService1.exe

I've never used the Visual Studio 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.

Hmmm, I have found something ... Visual Studio Command Aliases (MSDN).

like image 429
whytheq Avatar asked Oct 02 '12 21:10

whytheq


1 Answers

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"

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

like image 122
vlad Avatar answered Nov 09 '22 23:11

vlad