VS Nuget doesn't work with MAUI but does with WPF

Surico, Joseph [CCC-OT] 0 Reputation points
2024-05-20T19:47:16.7166667+00:00

I'm currently using Visual Studio Professional 2022 17.8.9. If I create a WPF project, I'm able to browse Nuget packages. However, if I create a MAUI project and try to browse Nuget, I get the following error message

-

[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.

An error occurred while sending the request.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.

Unable to load the service index for source https://api.nuget.org/v3/index.json.

-

Why is this an issue for MAUI projects but not WPF projects?

Deleting the nuget.config file did not help. This is also a fresh install of VS.

I also see this error:

Error [nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.

An error occurred while sending the request.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,539 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,782 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
{count} votes