-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 update dotnet
skd and runtime when installed on GitHub Codespaces
#8948
Comments
UPDATE: In a fresh codespace I was able to update to the correct version using the following steps:
However I believe there is some sort of bug in the installer script when you use the other codespaces image or if you have already used Also I feel like |
Not sure whom to ask regarding updating the |
@MichaelSimons Are you able to help here? |
The .NET team does not own these images, they are produced by the devcontainers team (and are based on the .NET images). Please see https://mcr.microsoft.com/en-us/product/devcontainers/dotnet/about, specifically the Support section. IDK what the version scheme is for this repo's images. The 0.-7.0 tag appears like a pinned tagged that is not intended to be updated. There are newer tags that contain 7.0.404. Try dev-7.0 or 1.1.0-dev. |
@TheLarkInn thanks for logging the original issue here and the steps that worked. I believe you are right that installed via packages (apt) installs in a different location than the script which is why you may be seeing diff output from But as a general guidance on Codespace images, I recommend folks find the best base image to use for their scenario. Some ideas:
That example above gives me .NET 8 base image but also installs latest 7.0.x versions of runtime. More on the .NET Feature can be found here: https://github.com/devcontainers/features/tree/main/src/dotnet My personal default example now is to use the latest .NET SDK image as base, then add my features as I see fit. This gives me (and those working in my repo) the best curated Codespaces experience to start. |
Description
I have a project whos
global.json
provides the following sdk version:When I used the GitHub Codespaces universal image (which does contain a preinstalled version of
dotnet
sdk., I get version 7.0.306. So of course when I attempt to use thedotnet
cli or any other extension or attempt to build I get failures saying:How, or what is the right way to update the sdk version.
I first went to this tutorial to attempt to update with
sudo apt-get update && sudo apt-get upgrade
etc, however still the only version that was showing up as detected was the original version the codespace installs.I then attempted to use the dotnet-install.sh script and as you can see from the image I provided, it was installed, however when I run
dotnet
again, it still only detects the original version.3. I then attempted to use a different devcontainer image (thinking that this would contain the most recent patch version of the 7.0 channel). I used the following image setting:
Here is the terminal results from the dotnet-install script which says that 7.0.404 is installed but
dotnet --info
command only detecting 7.0.401.Steps to reproduce
apt-get
ordotnet-install.sh
script to update dotnet versionI'm happy to reopen this in a different repo if helpful, and contribute documentation somewhere so that any first time dotnet users as myself don't have to waste multiple hours of troubleshooting to figure this headscratcher out. 😛
The text was updated successfully, but these errors were encountered: