Visual Studio command tools (ie, msbuild, mstest, dotnet) can be directly executed from Powershell and open in a new window.
- Depending on your version of Visual Studio, locate the path to the common tools. For example, if you decided to set an environment variable for this path, it could be something like:
- VS150COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools
- VS140COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools
- VS120COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 12.0Common7Tools
- VS110COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 11.0Common7Tools
- At this point, you can open the tool by opening Run –> cmd.exe /k “”%VS150COMNTOOLS%VsDevCmd.bat” & powershell”
- At this point, a Powershell prompt will open so that you can directly run msbuild, mstest, etc.