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

Downgrade android/ios .NET 8 workload to specific version #8968

Closed
JeroenBer opened this issue May 20, 2024 · 1 comment
Closed

Downgrade android/ios .NET 8 workload to specific version #8968

JeroenBer opened this issue May 20, 2024 · 1 comment
Assignees
Labels
needs-triage Issues that need to be assigned. question

Comments

@JeroenBer
Copy link

Android application type

.NET Android (net7.0-android, net8.0-android, etc.)

Affected platform version

.NET 8

Description

We accidentally updated our .NET 8 workload version by restoring a workload for another project.

Now on Windows our .NET8 Android workload version is:
34.0.1.94; git-rev-head:0d97e20; git-branch:release/8.0.2xx

We need to restore it to this version below because all our production releases are using this workload:
34.0.1.78; git-rev-head:87e4a6d; git-branch:release/8.0.1xx

Can anyone tell us exactly how to do this ?

Also we installed a new MacMini and because of some regression bugs for "ios" workload so we need to downgrade this from:

17.2.8053
to:
17.2.8022

There seems to be an option for dotnet workload restore --from-rollback-file for this ? But how do we determine the correct parameter for this ?

For professional development we need to be able to pin workloads. We first need to do some regression testing before bringing a new workload version into production.
Also we need to be able to specify the workload version we want to install, we want all our developers to use the same workload version and not use different versions or being forced to upgrade to the latest workload version.

Due to Xamarin upgrade experiences we first need to verify and test workload versions before updating them since they sometimes introduce new bugs. We also need to be able to revert to a previous version.

Steps to Reproduce

Not available

Did you find any workaround?

No

Relevant log output

No response

@JeroenBer JeroenBer added the needs-triage Issues that need to be assigned. label May 20, 2024
@jpobst jpobst assigned jonathanpeppers and unassigned jpobst May 20, 2024
@jonathanpeppers
Copy link
Member

--from-rollback-file is undocumented intentionally:

But if you want to use it, you should be able to figure out the contents with:

> dotnet workload update --print-rollback
==workloadRollbackDefinitionJsonOutputStart==
{
  "microsoft.net.sdk.android": "34.0.95/8.0.100",
  "microsoft.net.sdk.ios": "17.2.8053/8.0.100",
  "microsoft.net.sdk.maccatalyst": "17.2.8053/8.0.100",
  "microsoft.net.sdk.macos": "14.2.8053/8.0.100",
  "microsoft.net.sdk.maui": "8.0.21/8.0.100",
  "microsoft.net.sdk.tvos": "17.2.8053/8.0.100",
  "microsoft.net.workload.mono.toolchain.current": "8.0.5/8.0.100",
  "microsoft.net.workload.emscripten.current": "8.0.5/8.0.100",
  "microsoft.net.workload.emscripten.net6": "8.0.5/8.0.100",
  "microsoft.net.workload.emscripten.net7": "8.0.5/8.0.100",
  "microsoft.net.workload.mono.toolchain.net6": "8.0.5/8.0.100",
  "microsoft.net.workload.mono.toolchain.net7": "8.0.5/8.0.100",
  "microsoft.net.sdk.aspire": "8.0.0/8.0.100"
}
==workloadRollbackDefinitionJsonOutputEnd==

Make a file like this named workload.json:

{
  "microsoft.net.sdk.android": "34.0.78/8.0.100"
}

Then dotnet workload install android --from-rollback workload.json should install 34.0.78.

Long term, they are making it where you can pin workload versions in global.json:

Hope that helps! Closing for now, as this is probably an issue for dotnet/sdk, but I think this should get you what you need.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-triage Issues that need to be assigned. question
Projects
None yet
Development

No branches or pull requests

3 participants