2018-12-06 04:47:59 +03:00
|
|
|
@ECHO OFF
|
2020-08-12 03:04:48 +03:00
|
|
|
SETLOCAL
|
2018-12-06 04:47:59 +03:00
|
|
|
|
|
|
|
:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET Core SDK.
|
|
|
|
|
2020-08-12 03:04:48 +03:00
|
|
|
:: This tells .NET Core to use the same dotnet.exe that build scripts use
|
|
|
|
SET DOTNET_ROOT=%~dp0.dotnet
|
|
|
|
SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
|
2018-12-06 04:47:59 +03:00
|
|
|
|
|
|
|
:: This tells .NET Core not to go looking for .NET Core in other places
|
|
|
|
SET DOTNET_MULTILEVEL_LOOKUP=0
|
|
|
|
|
|
|
|
:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
|
|
|
|
SET PATH=%DOTNET_ROOT%;%PATH%
|
|
|
|
|
2020-08-12 03:04:48 +03:00
|
|
|
SET sln=%~1
|
2018-12-19 23:18:35 +03:00
|
|
|
|
2018-12-06 04:47:59 +03:00
|
|
|
IF "%sln%"=="" (
|
|
|
|
echo Error^: Expected argument ^<SLN_FILE^>
|
|
|
|
echo Usage^: startvs.cmd ^<SLN_FILE^>
|
|
|
|
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
2020-08-12 03:04:48 +03:00
|
|
|
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
|
|
|
|
echo .NET Core has not yet been installed. Run `%~dp0restore.cmd` to install tools
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
start "" "%sln%"
|