dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.7k stars 1.06k forks source link

workload install failing because of android manifest package version #17567

Closed lewing closed 3 years ago

lewing commented 3 years ago
dotnet --version
6.0.100-preview.5.21261.3
dotnet workload install microsoft-net-sdk-blazorwebassembly-aot          

Failed to update the advertising manifest microsoft.net.workload.blazorwebassembly: microsoft.net.workload.blazorwebassembly.manifest-6.0.100 is not found in NuGet feeds https://api.nuget.org/v3/index.json, https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json, https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json, https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json",.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
Updated advertising manifest microsoft.net.sdk.ios.
Installing workload manifest microsoft.net.sdk.android version 30.0.100---ci.main.0.
Workload installation failed, rolling back installed packs...
Installing workload manifest microsoft.net.sdk.android version 11.0.200---ci.main.256.
Installation roll back failed: Failed to install manifest microsoft.net.sdk.android version 11.0.200---ci.main.256: The transaction has aborted..
Workload installation failed: Failed to install manifest microsoft.net.sdk.android version 30.0.100---ci.main.0: One or more errors occurred. (microsoft.net.sdk.android.manifest-6.0.100::30.0.100---ci.main.0 is not found in NuGet feeds https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json",).
install
  Install a workload.

Usage:
  dotnet [options] workload install [<PACKAGE_ID>...]

Arguments:
  <PACKAGE_ID>  The NuGet Package Id of the workload to install.

Options:
  --sdk-version <VERSION>                                                  The version of the SDK.
  --configfile <FILE>                                                      The NuGet configuration file to use.
  --add-source <SOURCE>                                                    Add an additional NuGet package source to use during installation.
  --skip-manifest-update                                                   Skip updating the workload manifests.
  --from-cache <from-cache>                                                Complete the operation from cache (offline).
  --include-previews                                                       Allow prerelease workload manifests.
  --disable-parallel                                                       Prevent restoring multiple projects in parallel.
  --ignore-failed-sources                                                  Treat package source failures as warnings.
  --no-cache                                                               Do not cache packages and http requests.
  --interactive                                                            Allows the command to stop and wait for user input or action (for example to complete authentication).
  -v, --verbosity <d|detailed|diag|diagnostic|m|minimal|n|normal|q|quiet>  Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  -?, -h, --help                                                           Show help and usage information
nuget list -Source xamarin -Prerelease microsoft.net.sdk.android.manifest
Microsoft.NET.Sdk.Android.Manifest-6.0.100 30.0.100-ci.main.0+sha.d3ae4e1
dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

lewing commented 3 years ago

cc @jonathanpeppers

jonathanpeppers commented 3 years ago

We just bumped our version to 30.0.100, on this feed:

Did this happen because we changed the major version? We wanted to match our version to Android API level 30.

lewing commented 3 years ago

yeah my config is

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
    <add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
    <add key="xamarin" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json" />
  </packageSources>
</configuration>

It looks like it is finding the new version but mangling the semver somehow when trying to install it, then rollback fails and it tries to install the previous version, which also fails, then it exits before installing anything? I can install the workload with dotnet workload install microsoft-net-sdk-blazorwebassembly-aot --skip-manifest-update but unless I pass --skip-manifest-update the update step breaks everything before installing any packs.

jonathanpeppers commented 3 years ago

Yeah the three --- printed here doesn't seem to be right:

Installation roll back failed: Failed to install manifest microsoft.net.sdk.android version 11.0.200---ci.main.256: The transaction has aborted..
Workload installation failed: Failed to install manifest microsoft.net.sdk.android version 30.0.100---ci.main.0: One or more errors occurred. (microsoft.net.sdk.android.manifest-6.0.100::30.0.100---ci.main.0 is not found in NuGet feeds https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json",).
lewing commented 3 years ago

cc @dsplaisted @marcpopMSFT

dsplaisted commented 3 years ago

@sfoslund Can you look at this?

sfoslund commented 3 years ago

Sure, it looks like an issue with the FXVersion class that backs manifest versions. I put out a fix here: https://github.com/dotnet/sdk/pull/17614

lewing commented 3 years ago

This needs to make it into preview5