forked from dotnet/project-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Launch.cmd
33 lines (27 loc) · 1.04 KB
/
Launch.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
setlocal EnableDelayedExpansion
set BatchFile=%0
set Root=%~dp0
if "%ROOTSUFFIX%"=="" (
set ROOTSUFFIX=Exp
)
set VisualStudioXamlRulesDir=%Root%\artifacts\Debug\VSSetup\Rules\
set VisualBasicDesignTimeTargetsPath=%VisualStudioXamlRulesDir%Microsoft.VisualBasic.DesignTime.targets
set FSharpDesignTimeTargetsPath=%VisualStudioXamlRulesDir%Microsoft.FSharp.DesignTime.targets
set CSharpDesignTimeTargetsPath=%VisualStudioXamlRulesDir%Microsoft.CSharp.DesignTime.targets
:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/rootsuffix" set ROOTSUFFIX=%2&&shift&&shift&& goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing
for /f "tokens=*" %%i in ('where devenv.exe') do set DevEnvPath=%%i
echo Launching Visual Studio under the '!ROOTSUFFIX!' hive
echo %DevEnvPath%
devenv /rootsuffix !ROOTSUFFIX!
exit /b %ERRORLEVEL%
:Usage
echo Usage: %BatchFile% [/rootsuffix hive]
echo.
echo /rootsuffix Visual Studio hive to use when when launching (default is 'Exp')
goto :eof