How can I use PowerShell with the Visual Studio Command Prompt?

前端 未结 9 1707
一向
一向 2020-12-02 03:44

I\'ve been using Beta 2 for a while now and it\'s been driving me nuts that I have to punt to cmd.exe when running the VS2010 Command Prompt. I used to have a nice vsvars200

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 04:26

    Keith has already mentioned PowerShell Community Extensions (PSCX), with its Invoke-BatchFile command:

    Invoke-BatchFile "${env:ProgramFiles(x86)}\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
    

    I also noticed that PSCX also has an Import-VisualStudioVars function:

    Import-VisualStudioVars -VisualStudioVersion 2013
    

提交回复
热议问题