Visual Studio Preview NuGet Error

4 Answers 1201 Views
Miscellaneous
Scott
Top achievements
Rank 1
Veteran
Scott asked on 15 Sep 2022, 09:56 PM

The latest version of the Visual Studio Preview (17.4 preview 2) has introduced a connection issue with the Telerik NuGet servers.

[Telerik] Failed to retrieve metadata from source 'https://nuget.telerik.com/v3/search?q=&skip=0&take=26&prerelease=false&supportedFramework=.NETFramework,Version=v4.8&semVerLevel=2.0.0'.
  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.

The feed is still working on the same machine using Visual Studio 2022 17.3.4.

Rachel
Top achievements
Rank 1
commented on 22 Sep 2022, 02:29 PM

Quick solution for Visual Studio users
Select the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.

Regards,

Rachel Gomez

Scott
Top achievements
Rank 1
Veteran
commented on 22 Sep 2022, 05:18 PM

Mine was already set to that.
Scott
Top achievements
Rank 1
Veteran
commented on 14 Oct 2022, 06:55 PM

Microsoft identified a solution for us.

 

Please try to edit the two following devenv.exe.config files?

  1. %localappdata%\Microsoft\VisualStudio\17.0_*\devenv.exe.config, where * is the last recently accessed folder under %localappdata%\Microsoft\VisualStudio\,
  2. C:\Program Files\Microsoft Visual Studio\2022\Release\Enterprise\Common7\IDE\devenv.exe.config, the devenv.exe.config file from your Visual Studio installation.

In both files, delete the line containing the following:

        <servicePointManager checkCertificateRevocationList="true"/>

Then save and restart Visual Studio.

4 Answers, 1 is accepted

Sort by
0
Accepted
Scott
Top achievements
Rank 1
Veteran
answered on 14 Oct 2022, 06:55 PM

Microsoft identified a solution for us.

Please try to edit the two following devenv.exe.config files?

  1. %localappdata%\Microsoft\VisualStudio\17.0_*\devenv.exe.config, where * is the last recently accessed folder under %localappdata%\Microsoft\VisualStudio\,
  2. C:\Program Files\Microsoft Visual Studio\2022\Release\Enterprise\Common7\IDE\devenv.exe.config, the devenv.exe.config file from your Visual Studio installation.

In both files, delete the line containing the following:

        <servicePointManager checkCertificateRevocationList="true"/>

Then save and restart Visual Studio.

0
Nikolay Mishev
Telerik team
answered on 20 Sep 2022, 11:51 AM

Hello Scott,

Thank you for contacting us.

Could you check if the problem still exists, as there were some changes to the Telerik NuGet server yesterday regarding such an issue?

Please let me know if the problem is still present.

Regards,
Nikolay Mishev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Scott
Top achievements
Rank 1
Veteran
commented on 20 Sep 2022, 07:31 PM

We are still experiencing the issue.  nuget.org is working fine.  I checked with another team member that is seeing the same thing.  It starts right after updating Visual Studio 2022 to 17.4 Preview 2.

I tried the same on my home machine on a different network and got the same error.

Please install the latest version of Visual Studio 2022 Preview and see if you have the same issue.

Marc
Top achievements
Rank 1
commented on 22 Sep 2022, 08:48 AM

Hello Nikolay,

could you please investigate the availability of your NuGet server? Since yesterday there have been lots of 500 errors, this makes it very hard to work on CI/CD pipelines. Whatever change you guys made to the server, it definitely doesn't seem to run as stable now as it did before.

Thanks and best regards
Marc

0
Nikolay Mishev
Telerik team
answered on 23 Sep 2022, 12:14 PM

Hello,

We apologies for the inconvenience caused.

Our IT department performed a planned server migration the past few days, which resulted in an unexpected disturbance in the NuGet server. The problem should be resolved now. 

If, however, you are experiencing any further issues please get back to us so we can investigate.

Regards,
Nikolay Mishev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Scott
Top achievements
Rank 1
Veteran
commented on 23 Sep 2022, 02:51 PM

It is not resolved.  Have you tried using Visual Studio 2022 Preview to see if you are having the same issue?
Momchil
Telerik team
commented on 28 Sep 2022, 02:06 PM

Hi Scott,

I have initiated a private support communication because while investigating this we might need more details which may contain sensitive information. You can find the support ticket in your account.

Regards,
Momchil
Progress Telerik

Lance | Manager Technical Support
Telerik team
commented on 28 Sep 2022, 05:11 PM

Hi Scott. another developer who was experiencing the same issue as you was able to work around this by not relying on the cache:

dotnet restore --no-cache --disable-parallel

This leads us to believe there is a corrupt http cache. Can you please first try the above command?

If it works, then proceed with clearing the nuget http cache first

dotnet nuget locals http-cache --clear

or just clear all locals (http and package cache) and get a fresh start

dotnet nuget locals all --clear

Scott
Top achievements
Rank 1
Veteran
commented on 29 Sep 2022, 05:44 PM

  • I cleared the cache and ran dotnet restore and it works. 
  • I cleared the cache again and ran Restore NuGet Packages from Visual Studio 2022 Preview and it fails. 
  • I cleared the cache again and ran Restore NuGet Packages from Visual Studio 2022 and it works.
  • I cleared the cache again and ran Restore NuGet Packages from Visual Studio 2022 Preview without references Telerik packages or Telerik's NuGet server and only packages from nuget.org and it works.

Every scenario I can think of trying leads back to the combination of Visual Studio 2022 Preview and Telerik's NuGet server is the problem.

I will continue working on this using the ticket opened above and post the solution here for everyone once we find it.

Lance | Manager Technical Support
Telerik team
commented on 29 Sep 2022, 05:58 PM

Thanks for the update.

I noticed that we started seeing this after the .NET 7 preview update. Can you restrict the restore commands to use .NET 6, regardless of the VS version?  I usually do this with a global.json, but I dont think it's going to work in this case, this might need a .NET 7 downgrade ahammer.

As another idea, I'm attempting to build a NuGet server with it's own SSL cert, but I am having trouble finding the v3 version of the server. I do have a v2 version available, but that's the old SOAP protocol and not the json (v3) that seems to be relevant. If you know where I can find that, I will put up a new server and throw some test packages on there.

Scott
Top achievements
Rank 1
Veteran
commented on 29 Sep 2022, 06:02 PM

Can you restrict the restore commands to use .NET 6, regardless of the VS version?

Do you have any instructions on how to do that?  I've never tried that before.

I could also try removing the .NET 7 RC SDK if that does not work.
Lance | Manager Technical Support
Telerik team
commented on 29 Sep 2022, 06:10 PM

You can restrict the SDK version used for any project by adding a global.json to the project (Microsoft docs). The best place to put it is next to the .sln file (so that all projects in the solution will use it).

For example, take a look at this console app demo's folder => DevOpsExamples/src/Console, there you will find a global.json file there. It restricts dotnet to the latest .NET 6 version and disallows previews:

{
    "sdk": {
        "version": "6.0.100",
        "rollForward": "latestMinor",
        "allowPrerelease": false
    }
}

Scott
Top achievements
Rank 1
Veteran
commented on 29 Sep 2022, 10:29 PM

That did not make a difference.
Scott
Top achievements
Rank 1
Veteran
commented on 30 Sep 2022, 08:02 PM

I also tried removing .NET 7 RC completely and still get the error.
Nikolay Mishev
Telerik team
commented on 04 Oct 2022, 03:06 PM

Hi Scott,

We are going to need some more time investigating this and will get back to you.

Regards,

Nikolay

Scott
Top achievements
Rank 1
Veteran
commented on 04 Oct 2022, 03:24 PM

No problem.  The stable Visual Studio channel is working just fine.  We have time.
0
Momchil
Telerik team
answered on 07 Oct 2022, 01:11 PM

Hi,

 

The team is currently working on the NuGet server issues with high priority.

Please subscribe for status updates at https://status.telerik.com as it will be a central point for updates on the Telerik NuGet Server status and let us know if the error in Visual Studio Preview continues to happen after v3 service index issue is marked as resolved.

 

Regards,
Momchil
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Miscellaneous
Asked by
Scott
Top achievements
Rank 1
Veteran
Answers by
Scott
Top achievements
Rank 1
Veteran
Nikolay Mishev
Telerik team
Momchil
Telerik team
Share this question
or