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.6k stars 1.03k forks source link

Trying to get the packages for MAUI with MSVS 2022 preview did not download #23921

Closed Kings-Ohio closed 2 years ago

Kings-Ohio commented 2 years ago

Installed: Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.1.0 Preview 6.0

$(TargetFrameworks);net6.0-windows10.0.19041

Visual Studio consistently shows the dependencies for MAUI did not download.

When I open and build a new project the first thing in the error window is:

Build started... Failed to download package 'Microsoft.WindowsDesktop.App.Runtime.win-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.runtime.win-arm64/6.0.1/microsoft.windowsdesktop.app.runtime.win-arm64.6.0.1.nupkg'. Cannot access a disposed object. Object name: 'SslStream'. Failed to download package 'Microsoft.NETCore.App.Runtime.win-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg' has timed out after 100000ms. NuGet package restore failed. Please see Error List window for detailed warnings and errors. Error occurred while restoring NuGet packages: Central Directory corrupt. Build has been canceled.

Apologies for ignorance, any help appreciated!

dotnet-issue-labeler[bot] commented 2 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.

Kings-Ohio commented 2 years ago

Area label: Install

rmarinho commented 2 years ago

Hello we (MAUI team) are also having soem issues installing workloads on our CI .. note that we are not using nuget.org but some other dotnet feeds from azdo, but the issue seems very similar.

Workload installation failed: The request was canceled due to the configured HttpClient.Timeout of -0.001 seconds elapsing. heres an example https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5748981&view=logs&j=78462016-6fc7-57ab-3e4b-3ba758f547e0&t=d1d55c76-b549-5ad6-f888-f90c252730e6&l=1043

Skip NuGet package signing validation. The current .NET SDK is not signed by first party.
  Writing workload pack installation record for Microsoft.iOS.Sdk version 15.2.301-preview.13.2...
  Installing pack Microsoft.iOS.Windows.Sdk.Aliased version 15.2.301-preview.13.2...
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49e5305d-d845-4a14-9d69-6f5dbfb9570c/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   GET https://pkgs.dev.azure.com/microsoft/55e8140e-57ac-4e5f-8f9c-c7c15b51929d/_packaging/2072280b-f83c-41d6-9d8d-506f3a02066f/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json
  [NuGet Manager] [Info]   NotFound https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json 51ms
  [NuGet Manager] [Info]   NotFound https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json 56ms
  [NuGet Manager] [Info]   NotFound https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49e5305d-d845-4a14-9d69-6f5dbfb9570c/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json 60ms
  [NuGet Manager] [Info]   NotFound https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/registrations2-semver2/microsoft.ios.windows.sdk/index.json 64ms
  Workload installation failed. Rolling back installed packs...
  Uninstalling workload pack Microsoft.iOS.Sdk version 15.2.301-preview.13.2.
  Rolling back pack Microsoft.iOS.Sdk installation...
  Rolling back pack Microsoft.iOS.Windows.Sdk.Aliased installation...
  Workload installation failed: The request was canceled due to the configured HttpClient.Timeout of -0.001 seconds elapsing.
D:\a\_work\1\s\src\DotNet\DotNet.csproj(155,5): error MSB3073: The command ""D:\a\_work\1\s\bin/dotnet/dotnet" workload install ios --skip-manifest-update --verbosity diag --temp-dir "D:\a\_work\1\s\bin/temp/" --configfile "D:\a\_work\1\s\NuGet.config"" exited with code 1.

Build FAILED.
baronfel commented 2 years ago

@Kings-Ohio the Central Directory corrupt message from nuget restore makes me think that your global NuGet package cache got corrupted somehow - can you try deleting the directory at ~/.nuget/packages and trying again?

@rmarinho we're taking a look, thanks for the report.

rmarinho commented 2 years ago

@baronfel should i open a new bug?

Kings-Ohio commented 2 years ago

I was able to clear the nuget cache and noted that my ``\,nuget\Packages was deleted, as you suggested (Had been there just before). After a clean and rebuild I do see this about central directory being corrupted:

Build started... NuGet package restore failed. Please see Error List window for detailed warnings and errors. Error occurred while restoring NuGet packages: Central Directory corrupt. Build has been canceled.

The ``\,nuget\Packages had reappeared

Directory of c:\Users\pekin.nuget\Packages

02/16/2022 10:40 PM

. 02/16/2022 10:40 PM .. 02/16/2022 10:33 PM microsoft.aspnetcore.app.runtime.win-arm64 02/16/2022 10:33 PM microsoft.aspnetcore.app.runtime.win-x64 02/16/2022 10:33 PM microsoft.aspnetcore.app.runtime.win-x86 02/16/2022 10:33 PM microsoft.extensions.configuration 02/16/2022 10:33 PM microsoft.extensions.configuration.abstractions 02/16/2022 10:33 PM microsoft.extensions.configuration.binder 02/16/2022 10:33 PM microsoft.extensions.configuration.commandline 02/16/2022 10:33 PM microsoft.extensions.configuration.environmentvariables 02/16/2022 10:33 PM microsoft.extensions.configuration.fileextensions 02/16/2022 10:33 PM microsoft.extensions.configuration.json 02/16/2022 10:33 PM microsoft.extensions.configuration.usersecrets 02/16/2022 10:33 PM microsoft.extensions.dependencyinjection 02/16/2022 10:33 PM microsoft.extensions.dependencyinjection.abstractions 02/16/2022 10:33 PM microsoft.extensions.fileproviders.abstractions 02/16/2022 10:33 PM microsoft.extensions.fileproviders.physical 02/16/2022 10:34 PM microsoft.extensions.filesystemglobbing 02/16/2022 10:33 PM microsoft.extensions.hosting 02/16/2022 10:33 PM microsoft.extensions.hosting.abstractions 02/16/2022 10:33 PM microsoft.extensions.logging 02/16/2022 10:33 PM microsoft.extensions.logging.abstractions 02/16/2022 10:33 PM microsoft.extensions.logging.configuration 02/16/2022 10:33 PM microsoft.extensions.logging.console 02/16/2022 10:33 PM microsoft.extensions.logging.debug 02/16/2022 10:33 PM microsoft.extensions.logging.eventlog 02/16/2022 10:33 PM microsoft.extensions.logging.eventsource 02/16/2022 10:33 PM microsoft.extensions.options 02/16/2022 10:34 PM microsoft.extensions.options.configurationextensions 02/16/2022 10:33 PM microsoft.extensions.primitives 02/16/2022 10:33 PM microsoft.graphics.win2d 02/16/2022 10:33 PM microsoft.maui.controls.build.tasks 02/16/2022 10:33 PM microsoft.maui.dependencies 02/16/2022 10:33 PM microsoft.maui.extensions 02/16/2022 10:33 PM microsoft.maui.graphics 02/16/2022 10:33 PM microsoft.maui.graphics.win2d.winui.desktop 02/16/2022 10:33 PM microsoft.maui.resizetizer.sdk 02/16/2022 10:33 PM microsoft.netcore.app.host.linux-arm 02/16/2022 10:33 PM microsoft.netcore.app.host.linux-arm64 02/16/2022 10:33 PM microsoft.netcore.app.host.linux-x64 02/16/2022 10:40 PM microsoft.netcore.app.runtime.win-arm64 02/16/2022 10:33 PM microsoft.netcore.app.runtime.win-x64 02/16/2022 10:33 PM microsoft.netcore.app.runtime.win-x86 02/16/2022 10:33 PM microsoft.windows.sdk.net.ref 02/16/2022 10:33 PM microsoft.windowsappsdk 02/16/2022 10:33 PM microsoft.windowsdesktop.app.runtime.win-arm64 02/16/2022 10:33 PM microsoft.windowsdesktop.app.runtime.win-x64 02/16/2022 10:33 PM microsoft.windowsdesktop.app.runtime.win-x86 02/16/2022 10:33 PM system.diagnostics.diagnosticsource 02/16/2022 10:34 PM system.diagnostics.eventlog 02/16/2022 10:33 PM system.runtime.compilerservices.unsafe 02/16/2022 10:34 PM system.text.encodings.web 02/16/2022 10:34 PM system.text.json 02/16/2022 10:33 PM xamarin.android.glide 02/16/2022 10:33 PM xamarin.android.glide.disklrucache 02/16/2022 10:33 PM xamarin.android.glide.gifdecoder 02/16/2022 10:33 PM xamarin.androidx.activity 02/16/2022 10:33 PM xamarin.androidx.annotation 02/16/2022 10:34 PM xamarin.androidx.annotation.experimental 02/16/2022 10:34 PM xamarin.androidx.appcompat 02/16/2022 10:34 PM xamarin.androidx.appcompat.appcompatresources 02/16/2022 10:33 PM xamarin.androidx.arch.core.common 02/16/2022 10:33 PM xamarin.androidx.arch.core.runtime 02/16/2022 10:34 PM xamarin.androidx.asynclayoutinflater 02/16/2022 10:33 PM xamarin.androidx.browser 02/16/2022 10:34 PM xamarin.androidx.cardview 02/16/2022 10:33 PM xamarin.androidx.collection 02/16/2022 10:33 PM xamarin.androidx.concurrent.futures 02/16/2022 10:34 PM xamarin.androidx.constraintlayout 02/16/2022 10:34 PM xamarin.androidx.constraintlayout.core 02/16/2022 10:34 PM xamarin.androidx.coordinatorlayout 02/16/2022 10:33 PM xamarin.androidx.core 02/16/2022 10:34 PM xamarin.androidx.cursoradapter 02/16/2022 10:33 PM xamarin.androidx.customview 02/16/2022 10:34 PM xamarin.androidx.documentfile 02/16/2022 10:34 PM xamarin.androidx.drawerlayout 02/16/2022 10:34 PM xamarin.androidx.dynamicanimation 02/16/2022 10:33 PM xamarin.androidx.exifinterface 02/16/2022 10:33 PM xamarin.androidx.fragment 02/16/2022 10:33 PM xamarin.androidx.interpolator 02/16/2022 10:33 PM xamarin.androidx.legacy.support.core.ui 02/16/2022 10:33 PM xamarin.androidx.legacy.support.core.utils 02/16/2022 10:33 PM xamarin.androidx.legacy.support.v4 02/16/2022 10:34 PM xamarin.androidx.lifecycle.common 02/16/2022 10:33 PM xamarin.androidx.lifecycle.livedata 02/16/2022 10:33 PM xamarin.androidx.lifecycle.livedata.core 02/16/2022 10:34 PM xamarin.androidx.lifecycle.runtime 02/16/2022 10:34 PM xamarin.androidx.lifecycle.viewmodel 02/16/2022 10:33 PM xamarin.androidx.lifecycle.viewmodelsavedstate 02/16/2022 10:34 PM xamarin.androidx.loader 02/16/2022 10:34 PM xamarin.androidx.localbroadcastmanager 02/16/2022 10:33 PM xamarin.androidx.media 02/16/2022 10:33 PM xamarin.androidx.navigation.common 02/16/2022 10:33 PM xamarin.androidx.navigation.fragment 02/16/2022 10:33 PM xamarin.androidx.navigation.runtime 02/16/2022 10:33 PM xamarin.androidx.navigation.ui 02/16/2022 10:34 PM xamarin.androidx.print 02/16/2022 10:34 PM xamarin.androidx.recyclerview 02/16/2022 10:34 PM xamarin.androidx.savedstate 02/16/2022 10:34 PM xamarin.androidx.slidingpanelayout 02/16/2022 10:34 PM xamarin.androidx.swiperefreshlayout 02/16/2022 10:34 PM xamarin.androidx.tracing.tracing 02/16/2022 10:34 PM xamarin.androidx.transition 02/16/2022 10:34 PM xamarin.androidx.vectordrawable 02/16/2022 10:33 PM xamarin.androidx.vectordrawable.animated 02/16/2022 10:34 PM xamarin.androidx.versionedparcelable 02/16/2022 10:34 PM xamarin.androidx.viewpager 02/16/2022 10:34 PM xamarin.androidx.viewpager2 02/16/2022 10:33 PM xamarin.google.android.material 02/16/2022 10:33 PM xamarin.google.guava.listenablefuture 0 File(s) 0 bytes 110 Dir(s) 868,839,415,808 bytes free

Any suggestions appreciated!

Kings-Ohio commented 2 years ago

I am in a perfect storm of confusion as I said after clean/rebuild I see this error in VS 2022 Preview:

Error Error occurred while restoring NuGet packages: Central Directory corrupt.

One other thing in the output tab, showing output from the Package Manager - file transfer timing out after 100 seconds. This could be something on my side? It ends with the issue of the corrupted central directory.

After every clean of the cache the packages folder goes away, but comes back on the build.

Failed to download package 'Microsoft.NETCore.App.Runtime.win-x64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-x64/6.0.1/microsoft.netcore.app.runtime.win-x64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-x64/6.0.1/microsoft.netcore.app.runtime.win-x64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Host.linux-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm64/6.0.1/microsoft.netcore.app.host.linux-arm64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm64/6.0.1/microsoft.netcore.app.host.linux-arm64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Host.linux-arm.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm/6.0.1/microsoft.netcore.app.host.linux-arm.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm/6.0.1/microsoft.netcore.app.host.linux-arm.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Runtime.win-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.AspNetCore.App.Runtime.win-x64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.runtime.win-x64/6.0.1/microsoft.aspnetcore.app.runtime.win-x64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.runtime.win-x64/6.0.1/microsoft.aspnetcore.app.runtime.win-x64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Runtime.win-x64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-x64/6.0.1/microsoft.netcore.app.runtime.win-x64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-x64/6.0.1/microsoft.netcore.app.runtime.win-x64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Runtime.win-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.win-arm64/6.0.1/microsoft.netcore.app.runtime.win-arm64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.AspNetCore.App.Runtime.win-x64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.runtime.win-x64/6.0.1/microsoft.aspnetcore.app.runtime.win-x64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.runtime.win-x64/6.0.1/microsoft.aspnetcore.app.runtime.win-x64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Host.linux-arm64.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm64/6.0.1/microsoft.netcore.app.host.linux-arm64.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm64/6.0.1/microsoft.netcore.app.host.linux-arm64.6.0.1.nupkg' has timed out after 100000ms. Failed to download package 'Microsoft.NETCore.App.Host.linux-arm.6.0.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm/6.0.1/microsoft.netcore.app.host.linux-arm.6.0.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.host.linux-arm/6.0.1/microsoft.netcore.app.host.linux-arm.6.0.1.nupkg' has timed out after 100000ms. NuGet package restore failed. Please see Error List window for detailed warnings and errors. Time Elapsed: 00:07:08.7775267 ========== Finished ==========

Error occurred while restoring NuGet packages: Central Directory corrupt.

Kings-Ohio commented 2 years ago

Hey thanks for the good initial suggestion - my bad - I should check with Nuget. I've never had a problem with Github.

mattleibow commented 2 years ago

Yeah, stacks of the negative timeout error these days

Workload installation failed: The request was canceled due to the configured HttpClient.Timeout of -0.001 seconds elapsing.

mattleibow commented 2 years ago

Just adding that this sis still happening and we are using the 6.0.300-preview.22168.1 SDK. Pretty much a consistent failure so we added a retry and then it works the second time around...

marcpopMSFT commented 2 years ago

Both the original issue and the comments from Maui appear to be nuget related. It could be an issue with the local cache or the feeds or nuget but I'd ask them.

@mattleibow are you seeing you see nuget timeouts the first time you try it even today?

CC @aortiz-msft

marcpopMSFT commented 2 years ago

If you're still seeing workload installation failures, please open a separate issue.

ghost commented 2 years ago

Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the NuGet repository instead. Don’t forget to check out NuGet’s contributing guide before submitting an issue!

If you believe this issue was closed out of error, please comment to let us know.

Happy Coding!