Last active
January 3, 2024 05:59
-
-
Save timabell/279823d5433176f24d170ef9c43d797e to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# run with `source fix-omnisharp-asdf.sh` to ensure environment variables are made available | |
# https://stackoverflow.com/questions/70820780/vscode-or-anothers-editors-dont-recognize-sdk-dotnet-installed-with-asdf/70820974#70820974 | |
# tell omnisharp where to find the current dotnet sdk installed by asdf-vm | |
version=`asdf current dotnet-core | awk '{print $2}'` | |
echo "Parsed version: $version" | |
export DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR=$(echo $HOME/.asdf/installs/dotnet-core/$version/sdk/$version/Sdks) | |
export DOTNET_MSBUILD_SDK_RESOLVER_SDKS_VER=$version | |
export DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$(echo $HOME/.asdf/installs/dotnet-core/$version) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment