Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Visual Studio Developer Command Prompt from regular Command Prompt

This related question shows how to build and run a Visual Studio solution from Visual Studio Developer Command Prompt. My question is, is it possible to build and run a Visual Studio solution directly from the regular Windows Command Prompt (cmd.exe)?

like image 380
Huá dé ní 華得尼 Avatar asked Sep 02 '25 04:09

Huá dé ní 華得尼


1 Answers

Finally, I found the answer.

  1. Access VS Developer Command Prompt from regular command prompt.
C:\Users\Hwathanie>cmd.exe /k ""C:\Program Files (x86)\Microsoft Visual
Studio 12.0\VC\vcvarsall.bat"" x86
  1. Build the solution.
C:\Users\Hwathanie>msbuild "C:\Users\Hwathanie\Documents\Visual
Studio 2013\Projects\MyProject\MyProject.sln" /p:Configuration=Debug
  1. Run the exe file created.
C:\Users\Hwathanie>"C:\Users\Hwathanie\Documents\Visual Studio 2
013\Projects\MyProject\bin\Debug\MyProject.exe"
like image 130
Huá dé ní 華得尼 Avatar answered Sep 04 '25 19:09

Huá dé ní 華得尼