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.

Developer technologies | .NET | .NET MAUI
Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.