-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathstartvscode.cmd
More file actions
29 lines (21 loc) · 708 Bytes
/
startvscode.cmd
File metadata and controls
29 lines (21 loc) · 708 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
@ECHO OFF
SETLOCAL
:: This command launches Visual Studio Code 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 Code knows which one to use.
SET PATH=%DOTNET_ROOT%;%PATH%
:: Sets the Target Framework for Visual Studio Code.
SET TARGET=net10.0
SET FOLDER=%~1
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 "%FOLDER%"=="" (
code .
) else (
code "%FOLDER%"
)
exit /b 1