Skip to content

Can't install nuget packages locally [error: There are no versions available for the package / error: NU1101: Unable to find package No packages exist with this id in source(s)] #14054

Closed Answered by PlatinumLucario
PlatinumLucario asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, so the issue was that full paths aren't supported in dotnet add package. The directory of where the .nupkg is located needs to be defined in the NuGet.Config. So like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="local" value="C:/Users/Silve/source/repos/VGMusicStudio/CreateNugets/bin/Release" />
  </packageSources>
</configuration>

Then it has to be called by the package ID, not the full path to the package, while in your project folder, so like this:

dotnet add package VGMusicStudio.Dependencies.Adwaita.Native.win-x64 -s local

And there, it …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PlatinumLucario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant