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

Update .NET SDK #10964

Closed
8 of 16 tasks
DaleMckeown opened this issue Nov 13, 2024 · 19 comments
Closed
8 of 16 tasks

Update .NET SDK #10964

DaleMckeown opened this issue Nov 13, 2024 · 19 comments

Comments

@DaleMckeown
Copy link

DaleMckeown commented Nov 13, 2024

Tool name

.NET SDK

Tool license

https://dotnet.microsoft.com/en-us/download/dotnet/9.0

Add or update?

  • Add
  • Update

Desired version

.NET9

Approximate size

No response

Brief description of tool

.NET SDK needs updating to include the recently released .NET 9 framework.

URL for tool's homepage

https://dotnet.microsoft.com/en-us/download/dotnet/9.0

Provide a basic test case to validate the tool's functionality.

No response

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

No response

Tool installation time in runtime

No response

Are you willing to submit a PR?

No response

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @DaleMckeown , .Net version 9 will be added in next image roll out. thanks

@thomasbach-dk
Copy link

Could this be updated to include macos runners aswell?

@DaleMckeown
Copy link
Author

DaleMckeown commented Nov 14, 2024

@thomasbach-dk My understanding is they have some specific rules for macOS images, IIRC only 1 version of .NET is allowed on them. It will likely be a decision for MSFT to make themselves when they want to swap 8 out for 9, so I don't want it to hold up the rest of the images from being deployed with .NET9.

Feel free to submit a separate PR targeting macOS specifically.

@gkizior
Copy link

gkizior commented Nov 15, 2024

Hi @DaleMckeown , .Net version 9 will be added in next image roll out. thanks

ETA?

@artiomchi
Copy link

@DaleMckeown wait what? I never heard of something like that. Even the existing macos runners have multiple .NET versions installed.

e.g. https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#language-and-runtime

@michal-zatloukal
Copy link

Any update on this? Quite sad to see anyone using GitHub runners in CI not being able to use already released .NET 9 without having to install it every time.

@DaleMckeown
Copy link
Author

@vidyasagarnimmagaddi When will the new image be released? People want to start using .NET 9.

@sdcb
Copy link

sdcb commented Nov 25, 2024

actually Windows runner is using .NET 9 while others is using .NET 8

@michaelmairegger
Copy link

I don't get it why every year with each new .NET version we have to use the workaround of manually installing the .NET in the existing images. Why is Microsoft not able to release new runner-images on release date? I think every developer hopes that on day-0 the whole ecosystem is .NET9 ready.

@DaleMckeown
Copy link
Author

@michaelmairegger It'd be nice if the images were ready for day-0. .NET 9 was release nearly 2 weeks ago now. You'd imagine many people are using GitHub actions/ DevOps pipelines to deploy their applications.

I guess MSFT is a huge organisation (over 230,000 employees apparently) and the thinking is not as joined up as it could/should be.

@a1-jesper
Copy link

When can we expect a resolution?
Seems like there is one ready, but it only needs one more Reviewer Approval to be merged and available.

@ionixjunior
Copy link

Guys, it's very simple to solve: just add into your pipeline the task "Use .NET Core" and specify the newest version (9.0.101). The specified version will be downloaded and installed in a few seconds. I'm using this in a MAUI app targeting .NET 9 in a macOS 14. It works like a charm!

But I agree with you. It's strange, one month after .NET 9 launch, the SDK is not available yet. I think the same with the .NET workloads for MAUI. They're available only for Windows machines, and every time I'm using macOS to build the app, I need to install them.

@DoLoop216
Copy link

DoLoop216 commented Jan 9, 2025

As @ionixjunior mentions just add step which pins specific version (9.0 in this case).
To achieve this, take a look at setup-dotnet.

TL;DR:

- name: Setup .NET
  uses: actions/setup-dotnet@v3
  with:
    dotnet-version: '9.0.x'

(note: leave x as placeholder for patch)

@slaneyrw
Copy link

slaneyrw commented Jan 14, 2025

Guys, it's very simple to solve: just add into your pipeline the task "Use .NET Core" and specify the newest version (9.0.101). The specified version will be downloaded and installed in a few seconds. I'm using this in a MAUI app targeting .NET 9 in a macOS 14. It works like a charm!

But I agree with you. It's strange, one month after .NET 9 launch, the SDK is not available yet. I think the same with the .NET workloads for MAUI. They're available only for Windows machines, and every time I'm using macOS to build the app, I need to install them.

Unfortunately this breaks solutions that multi-target, specifically DotNetCoreCLI task using the 'test' command.

-- Sample Log from build agent. Test Project targets .NET 6, 8, and 9.
.NET 6 fails with the following.
.NET 8 target fails with the same result.
.NET 9 passes, but the whole task then fails as some of the result trx files are missing.

Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /opt/hostedtoolcache/dotnet/
The following frameworks were found:
9.0.0 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04
. Please check the diagnostic logs for more information.
Results File: /home/vsts/work/_temp/_fv-az422-7_2025-01-13_23_25_21.trx

Test Run Aborted.

@hemanthmanga
Copy link
Contributor

Hi @DaleMckeown, The latest release of .NET 9 is currently incompatible with Ubuntu and will not be included for the time being. For more details, please refer to the documentation. We are closing this issue, Thank you.

@michal-zatloukal
Copy link

Can you be more specific? What is incompatible in .NET 9 on Ubuntu? If there is something we should know.

@DaleMckeown
Copy link
Author

I too would like to know this. I have been manually installing .NET9 on Ubuntu images and have not run into any issues so far.

@slaneyrw
Copy link

Hi @DaleMckeown, The latest release of .NET 9 is currently incompatible with Ubuntu and will not be included for the time being. For more details, please refer to the documentation. We are closing this issue, Thank you.

Arbitrarily closing this item with that reason is a real amateur move. More details needed, given we can install explictly without apparent issues ( multi-targeting aside ).

The Ubuntu agent is the only Linux host you offer, what else are we supposed to use!

Seriously bad form

@hemanthmanga
Copy link
Contributor

hemanthmanga commented Jan 23, 2025

I too would like to know this. I have been manually installing .NET9 on Ubuntu images and have not run into any issues so far.

Hi @DaleMckeown, We have added the .NET 9 version to both Ubuntu 20 and Ubuntu 22. Kindly check the PR. However, for Ubuntu 24, .NET 9 is not yet available in the package manager as it is currently not supported in the built-in Ubuntu feed. If needed, you can install it manually, use backports, or utilize setup-dotnet. For more information, please read the complete documentation. Thank you.

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

Successfully merging a pull request may close this issue.