Blocked in work with VS 2022 .NET Core 6: "Could not load file or assembly 'Microsoft.DataAI.NuGetRecommender.Contracts"

Viewed 1534

I can not use NuGet Package Manager because in the package browse window I got the Error occurred message. Clicking "Show errors in output" gives:

Could not load file or assembly 'Microsoft.data.NuGetRecommender.Contracts, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Using the latest 17.0.1 version.

  • No google searches give valuable results.
  • As a workaround can I somehow turn off NuGet recommendations?

enter image description here

3 Answers

BTW, not sure if you have solved this yet, but I was getting the exact same error having all of my extensions disabled. I turned back on the one called "NuGetRecommender" and it worked perfectly! Hope that helps

enter image description here

You can try to disable or reinstall (although it seems it also has some issues currently) the NugetRecommender extension:

enter image description here

The missing file should be in extension directory:

c:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\NuGetRecommender\

enter image description here

You can try to download the nuget package and copy the missing dll there.

I don't know if this is still a problem. But I had the same issue and restoring Nuget Packages is what helped make it go away very easily. In VS 2022, and a lot of earlier versions, right click on the solution and use the context menu to restore the NuGet packages.

Related