-
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
Upgrade Windows 2019 image Visual Studio 16.8 #2022
Comments
Hello @robertmclaws, We keep the visual studio version always up to date. However, deploying images can sometimes take a week(or two). I will let you know right after the next image rollout. |
We are also waiting for this, we couldn't build our projects (Azure devops) that we upgraded to .Net 5 and waiting eagerly for the VS 16.8 to be available in the images. |
While waiting for the image to be updated a workaround is to update Visual Studio directly within the script. This can be done like mentioned here. I added these steps to my build pipeline (it add 5/10 minutes to the build but the build pass now). - bash: dotnet tool update -g dotnet-vs
- bash: vs install preview -sku:enterprise --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools
- bash: echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" No need to use the Net installer to install Net5 in this case as it is included with Visual Studio. |
Hello everyone, |
Hi @jackbond, we weren't oblivious but we missed one piece of the puzzle. We are obviously taking it as something to do better next time and planning the work to get it right. As for a timeline, we are targeting early next week. I'll update here if that slips. Sorry all for the delay! |
Anyone surprised at the amount of breaking changes, terrible documentation (plenty of pages where they just change the version number but don't actually check if the documentation is accurate. I dare you to try and implement custom storage providers for .net core identity.. The documentation is a F***ing joke) and general frustration that comes along with EVERY release of .NET Core to date really hasn't been paying attention. It's been an absolute shit show from the very start. Ever since they went 'open source'.. EF Core Many->Many relationships anyone? Waited forever and they couldn't even implement it without some hacky work around syntax. Microsoft wake up, you're falling further and further behind. |
I found myself not wanting to wait 2 weeks for a new release, and also not wanting to wait an additional 10 minutes for already long builds. So I posted a simple solution here: dotnet/core#5120 (comment) Short version: Use Chocolatey to add the latest VS Build Tools to the server, and compile using that. To the Azure DevOps team: it would make these situations easier if the MSBuild task let you specify alternate msbuild.exe locations. HTH! |
I moved my project over to .NET5 when the first RC dropped, which was advertised as 'production ready and supported', however as my CI build requires Visual Studio my Azure pipeline has effectively been unusable for over two months now. Looking ahead to .NET6, I think it would be highly desirable to add back support for preview builds of VS on the Windows 2019 image to eliminate this pain point of early adopters and testers of .NET previews. |
To the Azure DevOps team's credit, this process is mostly automated, so they push new software up into the image as it is released. I think the core issue here is 1) the VS / MSBuild team pushed a requirement for a new version of MSBuild that maybe didn't understand the full ramifications of that decision, b) the consolidation of images meant that there is no longer a "VS Preview" image that has the very latest preview bits, and c) the tasks available to the Pipelines don't make it easy to specify different MSBuild executables (mostly because that hasn't been necessary for a long time). All small problems by themselves, but in the context of trying to "Go Live" with an RC, turned out preventing us from taking advantage of that. Hopefully my code helps out for now, and then we can get a Preview image that always has the latest stuff. Thanks! |
Hi, The error I face is |
@saddamhossain I posted how to fix this here: dotnet/core#5120 (comment) |
@robertmclaws Thank you so much. I found the solution. |
Hello everyone! |
That's great news @maxim-lobanov ! To set expectations, is the ongoing rollout (and the "few days" duration) applicable to both Azure Devops and Github Actions? |
@JamesDSch , Yes, we deploy both Azure DevOps and GitHub Actions in parallel. |
@maxim-lobanov Thanks for the update. Out of interest, does this image have 16.8 and the .NET5 SDK, or is the plan to still add the SDK later? |
@p2pbsh This image contains only Visual Studio 16.8 without separate .NET 5 installation. But VS itself contains .NET 5 if you use VS to build apps. |
Just documenting that I ran into this error starting today with the VS 16.8 upgrade in Windows Server 2019 (20201116 update) #2076:
Update: NuGet 5.8.0 is now Fix - uses: nuget/setup-nuget@v1
+ with:
+ nuget-version: '5.8.x' |
Our builds broke today due to this, right when we had to release Hotfixes to Production! If these were breaking, Azure DevOps should have rolled back, or at least introduced another version with the previous image. It's crap to wake up to nasty messages from developers and customers who cannot get a fix out on time. |
Hi @patdaman, Could you please check if you are using latest Nuget? If the issue persists with latest Nuget, please, file an issue in our repo with minimal repro steps, and we will investigate it. |
I think this change was rolled out yesterday to our ado instance and the majority of our builds running there started failing. Could you roll this back? I'd be great if you could send announcements with the breaking changes and what actions needs to be taken by the customers.
|
Seen the exact same on my hosted agents this evening. I have the latest NuGet installed and was using the DotNetCoreCli Task and NO UseDotNet task. But the logs reported that the Net5 ask was used in the build. |
That error is because .NET Core 2.1 is deprecated, it was removed in VS 2019 16.8 (I dont remember where I read the warning, but Msft was clear that it was being removed). You can however easily fix it by explicitly adding a Use .NET Core task. Azure DevOpsFor example in Azure DevOps classic pipeline or a YAML pipeline: - task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.1.0' GitHub Actions workflowGitHub worflows use the setup-dotnet Action https://github.com/marketplace/actions/setup-net-core-sdk - name: Install .NET Core
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '2.1.0' |
On the flip side, 16.8 image in combo with NuGet 5.8 and UseDotNet task got all my broken NET5 projects building again, so please don't roll back :) |
The issue is more complex as it could affect internal ADO tasks that are central and would block many MS orgs. |
What I think would be a nice feature is to be able to pass in a specific image release number and the VM would spin up for that one (instead of from a hot pool of windows-latest). Like a demand, for example:
Yes, you know it is going to take more time to run the build because you need to wait for VM init, but you know exactly what you are getting. In the meantime, if you cannot add tasks to a pipeline, a faster fix may be to just switch to a self-hosted pool. |
I think the thing that sticks out at me from this .NET 5 release from a DevOps perspective is that Microsoft has data on every task that is being run, and the settings for each task. Microsoft should be able to know telemetry on the makeup of the build processes of their customers, and be able to warn specific customers when upcoming VM image default changes will break builds. They should also be able to have one-click mitigation options, like for example when .NET Core 2.X becomes unsupported, clicking the "Fix Me" button should add the .NET Core 2.1 task in. At the VERY least, there should be a build log analyzer that knows common failures in the build pipeline and recommends fixes. |
I totally get where you're coming from @jackbond, and in a previous life, I would wholeheartedly agree with you. However, Azure DevOps pipelines are basically just highly customizable Powershell commands, and you can actually do quite a bit yourself (including installing different Visual Studio instances). If you look at my earlier posts in this thread, I was able to get .NET 5 & the new MSBuild installed and compiling my builds in a couple hours over a weekend, with nothing more than Googlefu + trial and error. Yeah, breaking the builds sucks, but you need to be in a mindset that your build pipeline cannot be static, it will always be adapting. I think the biggest issue overall is that the VS team underestimated the impact of requiring updated MSBuild versions would have on customers. That disconnect comes from Microsoft assuming that projects are homogenous (pure .NET 5 that can be built from the command line) vs realizing that different parts of an architecture can and do run different frameworks. |
@LanceMcCarthy dotnet 2.1 is not deprecated, its eol date is in August 2021. Both 2.1 sdk and 2.1 runtimes are present on hosted agents. You can check that by running @Naninani , the error message |
The ship has sailed, of course, but new MSBuild being incompatible with restores from older NuGet versions seems like something that could have at least been a warning in the build log. I don't suppose NuGet leaves any evidence in |
@dahlbyk we have infact added warning logs to |
Visual studio 16.8 was deployed last week. |
Hey folks! Just wanted to give you folks a heads-up that a breaking change was introduced into .NET 5 that required mixed Framework / Core projects to use a version of MSBuild that only ships with the latest release. Since the "VS Preview" image was eliminated, there hasn't been a way to build our mixed projects in Azure DevOps for several months.
I'm raising this ticket to make sure VS2019 gets upgraded in a timely manner, so those of us that can't build with
dotnet build
can still enjoy the magic that is .NET 5. You're awesome, thanks so much! 👊🏻The text was updated successfully, but these errors were encountered: