0

I've added my private source of packages that hosted on gitlab by this command

dotnet nuget add source

its done successfully and added to my list of sources, then I've pushed my packages on it, the packages are also up when I check them on gitlab repo/packages & registeries. Now the problem is when I want to add this packages on other projects:

dotnet add package <myPackageName> -s <mySourceNameThatHasAlreadyAdded>

enter image description here

dotnet Cli says There are no versions available for the package <myPackageName> however already two versions of this package available on gitlab(mySourceNameThatHasAlreadyAdded).

how colud I solve this issue?

Vahid
  • 474
  • 2
  • 7
  • 20
  • 1
    Are your packages prerelease-packages? Have you checked of these packages are compatible with the projects you are trying to add them to? – D.J. Aug 23 '21 at 11:37
  • yes, my packages are in release mode and about compatibility, of course these packages are built in .net standard 2.1 and I just wanna use them in .net core 5 projects. @D.J. – Vahid Aug 23 '21 at 15:20

1 Answers1

1

I found the solution, I don't know why but the issue was resolved by eliminating the

-s <mySourceNameThatHasAlreadyAdded>

from the add command and just write

dotnet add package <myPackageName>

and because my private source package is the only package source in the result of

dotnet nuget list source

command, without any idea now it works!

Vahid
  • 474
  • 2
  • 7
  • 20