Nuget not searching in custom package sources

269 Views Asked by At

I have added 2 custom package sources. If I search in nuget package manager, I find my package. If I install the package it fails with the following error:

Restoring packages for .NETStandard,Version=v2.1...
  GET https://api.nuget.org/v3-flatcontainer/mypackage.test/index.json
  NotFound https://api.nuget.org/v3-flatcontainer/mypackage.test/index.json 125ms
Resolving conflicts for .NETStandard,Version=v2.1...
Unable to find package mypackage.test. No packages exist with this id in source(s): nuget.org
Package restore failed. Rolling back package changes for 'FormsApp1'.

In the logging I see that package manager only searches in nuget.org and not in my custom sources.

I am using VS for mac 17.4.2, Nuget 6.4.0.117

Questions:

  1. How do I tell package manager to also search in my custom sources?
  2. How do I install a specific version of nuget on Mac? I would like to try version 6.3.1.1.
1

There are 1 best solutions below

0
On

I solved this issue by installing VS2019.

When installing VS2019 it replaces VS2022. But you can install VS2022 Preview alongside. After installing VS2019, the package manager works correctly in VS2019 as well as VS2022 Preview.

So I guess the installation of VS2022 is broken as it was a fresh install on a new laptop.