Reputation: 4811
What is the best way to reference a libarary downloaded using nuget?
When I go to references and then find the path to the library inside of the packages folder, it seems to include my TFS branch path in the reference path.
How do I get it to reference the dll in a more generic way?
I don't see the "installed packages" options either:
Upvotes: 1
Views: 426
Reputation: 76670
What is the best way to reference a libarary downloaded using nuget?
You should set that nuget package to a local feed, then manage it with nuget.
Detail steps:
Create local feed:
Go to Tools
->Options
->NuGet Package Manager
->Package Sources
, click the green plus button, then add a available package source and configure the Name
of package source and Source
:
Add the downloaded package to the load feed, which you set in the Source
of package source in the first step.
Manage package with nuget:
Right click on the References, select Manage NuGet packages...
, select local feed source on the opened NuGet Package Manager window, find the downloaded package, then you can add it by clicking Install button:
Hope this helps.
Upvotes: 2
Reputation: 12485
Don't reference the package directly. Add the package to the project using Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution.
Upvotes: 0