Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify source in nuspec dependency

I have a local NuGet feed. This feed contains a dependency and that dependency is on nuget.org.

This is in my nuspec file:

<dependencies>
  <dependency id="log4net" version="[1.2.10]" />
</dependencies>

How can I specify that NuGet has to look in nuget.org for this dependency? I currently receive:

Install-Package : Unable to resolve dependency 'log4net (= 1.2.10)'.

When I perform an Install-Package via the Package Manager Console in Visual Studio.

like image 733
Marnix Avatar asked Sep 26 '22 05:09

Marnix


1 Answers

In your Package manager console, the top left corner has a dropdown to select the package source. Make sure you have selected "All" when you try to install packages that might have dependencies from other package sources.

like image 138
KnightFox Avatar answered Sep 30 '22 06:09

KnightFox