-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7dda3d6
commit 984094c
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
echo Installing .NET Core SDK Helper... | ||
setx path "%PATH%;%CD%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@echo off | ||
|
||
if [%1]==[help] goto help | ||
if [%1]==[] goto help | ||
if [%1]==[list] goto sdk_list | ||
if [%1]==[latest] goto sdk_latest | ||
echo Switching .NET Core SDK version to %1 | ||
( | ||
echo { | ||
echo "sdk": { | ||
echo "version": "%1" | ||
echo } | ||
echo } | ||
) > global.json | ||
goto end | ||
|
||
:sdk_list | ||
echo The installed .NET Core SDKs are: | ||
dir /b "%programfiles%\dotnet\sdk" | ||
goto end | ||
|
||
:sdk_latest | ||
if exist global.json del global.json | ||
echo .NET Core SDK version switched to latest version. | ||
dotnet --version | ||
|
||
goto end | ||
|
||
:help | ||
echo .NET Core SDK Switcher | ||
echo. | ||
echo Usage: .net sdk [command] | ||
echo Usage: .net sdk [version] | ||
echo. | ||
echo Commands: | ||
echo latest Swtiches to the latest .NET Core SDK version | ||
echo list Lists all installed .NET Core SDKs | ||
echo help Display help | ||
echo. | ||
echo versions: | ||
echo An installed version number of a .NET Core SDK | ||
echo. | ||
|
||
:end |