-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add .NET 6 SDK #4424
Comments
Hey, @akyamada-ms |
Hi @akyamada-ms! |
Thank you, @al-cheb @miketimofeev |
@miketimofeev is the guidance going forward to rely on UseDotNet@2 to get dotnet onto the agent? |
@epvanhouten using setup-* actions or Use* tasks is a recommended way to install the desired version. |
Make sure you force the base path |
.NET 6 has been out today (a day early), I can manually install it today however when invoking an .NET global tool it will fail on me saying that the I guess I could have it fallback to |
Ok I found a workaround for this: use the following locally and commit these to repository:
from repository root. Then install all the tools you need without Then in the github actions workflows run |
You are hitting the bug I had |
This will install the latest .NET 3.1, 5.0 and 6.0 in the github action. Adding this will make the action future proof, in case Github decides to remove the dotnet SKDs from the latest images. @miketimofeev mentioned earlier, that it is under consideration. Btw each SDK install takes 6-7s.
|
Just to add, this request is more than just installing NET6 RTM to the runner. We also need |
@LanceMcCarthy the VS2022 stable image with .NET 6.0 is currently rolling out and will be generally available tomorrow. |
@LanceMcCarthy , Windows Server 2022 with VS2022 has been deployed. |
Actually I replaced the setup-dotnet github action, but I figured out a solution to the .NET Core global tools issue. And then at the root of the repository I did:
And then I run the tool install commands without the After that I use |
As we decided not to add .NET for all the images (at least for now) I'm going to close the issue. |
When will the Ubuntu 20.04 DevOps agent have .NET 6.0 pre installed? (in the same style that it has 5.0) |
@mikeblakeuk please consider using the task https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops |
While we can use the task it is far less reliable then having it already on the agent. We just switched to .NET 6.0 SDK a few days ago and already seeing random issues like:
|
@weshaggard That end of file error is something that happens when an archive is empty or corrupt (i.e. a bad download) You'll want to use the "Use .NET" Task instead of manually installing stuff. Mainly, it's more reliable, but much neater 😎 It will detect the OS, properly install it in the correct location and will update PATH. In GitHub Actions - uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x' In Azure DevOps
If you're still using ADO Classic pipeline, see my previous reply for a screenshot. |
We are using the DevOps task I just didn't post the full log:
|
Any update? |
@miketimofeev any chance this can be reconsidered? On Windows VM it is at least 30 seconds slower on average when compared to Ubuntu VM for GitHub runner. |
I am working on something with my github action to do something about this. I plan to do stuff like allowing to pass in a list of .NET versions to install. However it would be nice to implement caching for those who specify explicit versions and does not wildcard a specific version (for the .NET install scripts to install). |
@jetersen we will discuss this internally. There is a chance we will pre-install only the latest available 6.* version on the image |
So basically there is a chance that it may be |
I've just hit this issue having moved all our code to .NET 6, I have a separate task that uses What was the reasoning by not including .NET 6 on ubuntu images, this is nuts! |
@miketimofeev You posted a month ago that this would be under discussion. How is that discussion coming??? The rest of us out here in the real world are still pretty shocked that the windows hosted agents come with NET 6, and the linux ones do not. So much for an equitable approach for dotnet 5+ ... The sheer cost in lost engineering time that this questionable decision is going to cause is only going to grow over time as more teams try to adopt NET 6 only to find it doesn't work out of the box if they run linux hosted agents. [EDIT] Actual RepercussionsFor what it's worth this was a minor annoyance for us, it sucked up about 3 hours of time in total from discovery to resolution. We have zero .NET 6 code at the moment, however one of our engineers attempted to use file-scoped namespaces while using Visual Studio 2022 and we caught this when a PR was submitted. It 100% builds locally while the project is targeting NET 5 for anyone who has Visual Studio 2022 installed, or the NET 6 SDK and the latest Rider IDE. I would assume people using VS Code would also be able to locally compile files with file-scoped namespaces but I have not tested this personally. No one likes when code compiles locally but fails at the build server 👎. We have 62 pipelines defined in Azure DevOps. Of those 62 pipelines - 47 needed to be updated from using the pre-installed SDKs (that we have used historically since we migrated to AZP several years ago) to adding two actions. We are fortunate for several things... one we just late last year migrated ALL of our net core code to net5. Up until very recently we would have needed to add 4 (or more) different SDK versions because adding just 6.0 makes everything else break. Secondly that we have built our own functionality to "template" out the Pipelines, such that we can make a change to one place and copy it to all the other defined pipelines. Otherwise updating these 47 legacy (non-yaml ... i know ... 🤮 ) pipelines would have been a hurdle that we probably would not have crossed without major prodding. 🍿 🍿 This is gonna be fun once people are forced off NET 5 - May 8, 2022 🍿 🍿 |
🤯 I was not aware of the fact that Windows had .NET 6 installed and the active decision is to NOT install it on ubuntu. But it clearly shown here: Though seems the script for this is broken. The toolset is defined here: Seems the powershell script ignores that based on the software report. I guess this is due to Visual Studio Installer having a field day installing varies workloads 😅 |
If the argument is maintenance and security why is it installed on Windows machines (with a variety of patches: 3.1.120 3.1.202 3.1.302 3.1.416 5.0.104 5.0.210 5.0.303 5.0.404 6.0.101) Again if the argument is maintenance and security simply give us the latest patched .NET LTS (Active) and Current? Much like Node, Python, Java, Ruby, Go, PHP, Xcode, Xamarin, Android SDK.
according to https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle I think it would be fine to support the lifecycle and for anything else or a if you need a specific patch or minor version of .NET use Maybe, it is just me. |
I think it should be listed higher on list of Microsoft priorities to bring it up because in less than 4 months you are dropping support of .NET 5 whereas .NET 6 is not yet fully ready as we see. Or increase support time for .NET 5 if you are not yet ready for whatever "security" reasons you have. |
👋 Hi everyone! I’m Steve, the Product Manager working in the virtual environments domain. We’ve been actively reviewing feedback from the community on this issue and have been internally discussing the addition of the .NET 6 SDK to the Ubuntu image. The community feedback, internal discussions, and review of security and maintenance concerns/requirements have led us to the following solution:
In regards to ETA, I’ll be working with the team to prioritize software updates and we will communicate via this issue. Please let us know if you have any additional questions and thank you for voicing concerns with our team! |
@Steve-Glass Thanks for reaching a decision. |
@Steve-Glass It is true for all supported SDKs, right, and not just 6.0? So the latest 3.1 5.0 and 6.0 SDKs would be included. |
Changes have been deployed to production environments. |
I have a better idea for keeping the images up to date (for those who need .NET SDKs newer than those preinstalled): |
Tool name
.NET 6 SDK
Tool license
N/A
Add or update?
Desired version
N/A
Approximate size
No response
Brief description of tool
I’m support engineer in Japan. One of my customers is using Ubuntu latest OS image for Microsoft-hosted agents in Azure DevOps Services. Does not have .NET 6 installed in Ubuntu latest OS image, so he adds the following definition to Pipeline and installs it every time.
steps:
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
version: 6.0.100-rc.2.21505.57
installationPath: $(Agent.ToolsDirectory)/dotnet
I think you already have a plan, but I would like to request to include .NET 6 in the OS image.
Also, I would appreciate it if you could let me know when the OS image will include .NET 6 and if there is any publicly available information about future plans.
URL for tool's homepage
https://github.com/dotnet/core/tree/main/release-notes/6.0
Provide a basic test case to validate the tool's functionality.
No response
Virtual environments affected
Can this tool be installed during the build?
Tool installation time in runtime
N/A
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: