-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathstartvs.cmd
More file actions
24 lines (18 loc) · 686 Bytes
/
startvs.cmd
File metadata and controls
24 lines (18 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@ECHO OFF
SETLOCAL
:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET SDK.
:: This tells .NET to use the same dotnet.exe that the build script uses.
SET DOTNET_ROOT=%~dp0.dotnet
SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use.
SET PATH=%DOTNET_ROOT%;%PATH%
SET sln=%~dp0TodoApp.slnx
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
echo The .NET SDK has not yet been installed. Run `%~dp0build.ps1` to install it
exit /b 1
)
IF "%VSINSTALLDIR%" == "" (
start "" "%sln%"
) else (
"%VSINSTALLDIR%\Common7\IDE\devenv.com" "%sln%"
)