Reputation: 197
I'm trying to install a package from a private repository on a dot net core application that I'm building on a Mac. What I can't find is anywhere that I can specify where dotnet restore should be looking for packages.
How can I specify where restore should be looking?
Thanks,
Richard.
Upvotes: 0
Views: 645
Reputation: 1978
Add a "NuGet.Config" File to the Folder level where your Solution file is present (.sln)
Note : ".nuget" folder should not be committed and does not used by the latest nuget.
It will look like below
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" /> // Optional
</solution>
<packageSources>
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
<add key="My custom Package" value="http://Custom Domain/nuget" />
</packageSources>
</configuration>
Upvotes: 1
Reputation: 197
Should have spent another 10 minutes poking around - the answer seems to be ~/.nuget/NuGet/NuGet.Config contains the configuration for restoring packages.
Upvotes: 1