Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add MSBuild path to terminal? #34

Open
Ackara opened this issue Dec 20, 2017 · 4 comments
Open

Add MSBuild path to terminal? #34

Ackara opened this issue Dec 20, 2017 · 4 comments

Comments

@Ackara
Copy link

Ackara commented Dec 20, 2017

Is it possible to add msbuild.exe to the terminal? It would be nice if I we can invoke msbuild commands straight from the terminal as well.

Or maybe we can add the 'Developer Command Prompt for VS 2017' as default shell.

@ZoeyR
Copy link
Contributor

ZoeyR commented Dec 20, 2017

You can set your own startup commands in the Tools>Options menu. Presumably 'Developer Command Prompt for VS 2017' has a startup commands that sets it's path. I'll look into adding that prompt as an option though.

@nirlavi
Copy link

nirlavi commented Dec 24, 2017

You can use Developer command Prompt with Powershell by selecting CMD as your Terminal in the settings dgriffen mentioned above.
Then for arguments just put this:
"/k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE..\Tools\VsDevCmd.bat" &powershell -ExecutionPolicy Bypass"

(Make you are using the proper path for Visual Studio command prompt..)

@fkorak
Copy link

fkorak commented Jan 23, 2018

For anybody not on Enterprise but rather Professional the arguments are:
"/k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" &powershell -ExecutionPolicy Bypass"

@dgriffen You might need an additional switch for selecting the visual studio edition or autodetect the visual studio version and edition, since that changes the path to the startup file. The docs explicitly warn against including the startup commands by yourself: See here.

VsDevCmd.bat can vary from computer to computer. Do not replace a missing or damaged VsDevCmd.bat file with a VsDevCmd.bat from another computer. Instead, rerun setup to replace the missing file.

@stijnherreman
Copy link

This would be very useful to execute MSBuild targets on demand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants