LoginSignup
1
0

More than 5 years have passed since last update.

Visual Studio コマンドプロンプト起動バッチの場所

Posted at

コマンドラインでビルドを実行するのに使用する Visual Studio コマンドプロンプトですが、インストール時にできるショートカットを使うと新しいウインドウが開いてしまいます。
しかし、起動バッチを直接実行すれば、既存のコンソールに環境変数だけ取り込むことができます。

2015まで

標準的なインストールパス

C:\Program Files (x86)\Microsoft Visual Studio 11.0

バッチの場所

  • amd6464などターゲットの情報がパスに入ります。
(インストールパス)\VC\bin\amd64\vcvars64.bat

2017

標準的なインストールパス

  • エディションが入ります。
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional

バッチの場所(+コマンドライン)

  • ターゲットの情報は引数になりました。
(インストールパス)\VC\Auxiliary\Build\vcvarsall.bat amd64

PowerShellから起動

Import-VisualStudioVars` コマンドレットを使います。

Import-VisualStudioVars -VisualStudioVersion 2017 -Architecture amd64

※ PSCXが必要なので、ない場合は以下のコマンドでインストール

Install-Module Pscx -Scope CurrentUser
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0