This commit is contained in:
Juan Hoyos 2024-11-06 09:48:30 -08:00 коммит произвёл GitHub
Родитель a1de4008a9
Коммит 4e63c3e140
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 30 добавлений и 0 удалений

30
start-vscode.sh Normal file
Просмотреть файл

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# This command launches a Visual Studio code with environment variables required to use a local version of the .NET Core SDK.
# This tells .NET Core to use the same dotnet.exe that build scripts use
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export DOTNET_ROOT="$DIR/.dotnet"
# This tells .NET Core not to go looking for .NET Core in other places
export DOTNET_MULTILEVEL_LOOKUP=0
# Put our local dotnet on PATH first so Visual Studio knows which one to use
export PATH="$DOTNET_ROOT:$PATH"
# Sets TFW for Visual Studio Code usage
export TARGET=net10.0
if [ ! -f "$DOTNET_ROOT/dotnet" ]; then
echo ".NET Core has not yet been installed. Run `./dotnet.sh --info` to install tools."
exit 1
fi
if [[ $1 == "" ]]; then
code .
else
code $1
fi
exit 1