зеркало из https://github.com/dotnet/diagnostics.git
Add helper scripts to open in VS Code with proper SDK (#4523)
This commit is contained in:
Родитель
dd431c607a
Коммит
e1bda90d48
|
@ -6,15 +6,14 @@ set "SLN_OR_PROJ=%~dp0diagnostics.sln"
|
|||
|
||||
set "DOTNET_ROOT=%SDK_LOC%"
|
||||
set "DOTNET_ROOT(x86)=%SDK_LOC%\x86"
|
||||
set DOTNET_MULTILEVEL_LOOKUP=0
|
||||
set "DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=%DOTNET_ROOT%"
|
||||
|
||||
set PATH=%DOTNET_ROOT%;%PATH%
|
||||
|
||||
:: Restore before doing this
|
||||
|
||||
if not exist "%DOTNET_ROOT%\dotnet.exe" (
|
||||
echo [ERROR] SDK has not yet been installed.
|
||||
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
|
||||
echo [ERROR] .NET Core has not yet been installed. Run `%~dp0dotnet.cmd` to install tools
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set "SDK_LOC=%~dp0.dotnet"
|
||||
|
||||
set "DOTNET_ROOT=%SDK_LOC%"
|
||||
set "DOTNET_ROOT(x86)=%SDK_LOC%\x86"
|
||||
set "DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=%DOTNET_ROOT%"
|
||||
|
||||
set "PATH=%DOTNET_ROOT%;%PATH%"
|
||||
|
||||
:: Restore before doing this
|
||||
|
||||
SET folder=%~1
|
||||
|
||||
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
|
||||
echo [ERROR] .NET Core has not yet been installed. Run `%~dp0dotnet.cmd` to install tools
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
IF "%folder%"=="" (
|
||||
code .
|
||||
) else (
|
||||
code "%folder%"
|
||||
)
|
||||
|
||||
exit /b 1
|
Загрузка…
Ссылка в новой задаче