forked from agentic-review-benchmarks/aspnetcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartvs.cmd
More file actions
31 lines (23 loc) · 788 Bytes
/
startvs.cmd
File metadata and controls
31 lines (23 loc) · 788 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
25
26
27
28
29
30
31
@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 build scripts use
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=%~1
IF "%sln%"=="" (
echo Error^: Expected argument ^<SLN_FILE^>
echo Usage^: startvs.cmd ^<SLN_FILE^>
exit /b 1
)
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
echo .NET has not yet been installed. Run `%~dp0restore.cmd` to install tools
exit /b 1
)
IF "%VSINSTALLDIR%" == "" (
start "" "%sln%"
) else (
"%VSINSTALLDIR%\Common7\IDE\devenv.com" "%sln%"
)