Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to have multiple SDKs/Runtimes at the same time ? #24

Open
kedare opened this issue Nov 19, 2020 · 2 comments
Open

How to have multiple SDKs/Runtimes at the same time ? #24

kedare opened this issue Nov 19, 2020 · 2 comments

Comments

@kedare
Copy link

kedare commented Nov 19, 2020

Hello.

I was trying to compile identity server ( https://github.com/DuendeSoftware/IdentityServer ) but it requires both SDK 5.0 and 3.1.0 to be available, I installed them both with asdf and set 5.0 as the global one but I am getting the following error

bash build.sh 
Tool 'signclient' (version '1.2.17') was restored. Available commands: SignClient
Tool 'dotnet-ef' (version '3.1.0') was restored. Available commands: dotnet-ef

Restore was successful.
~/Documents/Repositories/IdentityServer/src/Storage ~/Documents/Repositories/IdentityServer
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
  - The following frameworks were found:
      5.0.0 at [/home/kedare/.asdf/installs/dotnet-core/5.0.100/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=linuxmint.20-x6

A few info:

dotnet --list-sdks
5.0.100 [/home/kedare/.asdf/installs/dotnet-core/5.0.100/sdk]

dotnet --list-runtimes
Microsoft.AspNetCore.App 5.0.0 [/home/kedare/.asdf/installs/dotnet-core/5.0.100/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.0 [/home/kedare/.asdf/installs/dotnet-core/5.0.100/shared/Microsoft.NETCore.App]

asdf list dotnet-core
  3.1.404
  5.0.100

How can I fix that ?

Thanks

@kedare kedare changed the title How to have multiple SDK/Runtime at the same time ? How to have multiple SDKs/Runtimes at the same time ? Nov 19, 2020
@emersonsoares
Copy link
Owner

emersonsoares commented Apr 15, 2021

Hmm, my guess is that you just need the 3.1 sdk. You can set it to local with:

asdf local dotnet-core 3.1.404

or globally with:

asdf global dotnet-core 3.1.404

You can have have multiple sdk's using the local feature of asdf.

@jc00ke
Copy link

jc00ke commented Aug 11, 2021

I'm running into a similar issue trying to install FsAutoComplete for neovim LSP.

projects/fsharp/demo via .NET v5.0.400 🎯 netcoreapp3.1
➜ asdf local dotnet-core 3.1.412
projects/fsharp/demo via .NET v3.1.412 🎯 netcoreapp3.1
➜ dotnet tool install --global fsautocomplete
error NU1202: Package fsautocomplete 0.47.1 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3
.1) / any. Package fsautocomplete 0.47.1 supports: net5.0 (.NETCoreApp,Version=v5.0) / any
The tool package could not be restored.
Tool 'fsautocomplete' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the ve
rsion.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool


projects/fsharp/demo via .NET v3.1.412 🎯 netcoreapp3.1
➜ asdf local dotnet-core 5.0.400
projects/fsharp/demo via .NET v5.0.400 🎯 netcoreapp3.1
➜ dotnet tool install --global fsautocomplete
Tools directory '/home/jesse/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/home/jesse/.dotnet/tools"
EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/home/jesse/.dotnet/tools"

You can invoke the tool using the following command: dotnet-fsautocomplete
Tool 'fsautocomplete' (version '0.47.1') was successfully installed.

I then run into fsprojects/fantomas#412

Should dotnet and dotnet-core be two different asdf plugins so we can have access to both?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants