0

I think something is jacked up with my Nuget where a package restore isn't restoring properly

So my global cache seems to have the stuff %userprofile%.nuget\packages

But in a new repo I download that has a packages.config for like
<package id="Owin" version="1.0" targetFramework="net48" />

And a reference in the proj for

<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>

When I restore, I just don't get ../packages created, it's just telling me "All packages are already installed and there is nothing to restore."

I don't understand what is configured wrong where this just doesn't work.

I'm guessing maybe I have some global shared folder or something and it's ignoring the local per-project \package folders maybe? But like I can't edit the proj files for this Repo as then it'd break it for every other dev.

Running Package reinstall command from the Package Manager command window seems to checkout packages.config then go through and REMOVE everything from packages.config to move them somewhere else!?

Steve McNiven-Scott
  • 1,770
  • 2
  • 15
  • 29
  • 1
    Does it compile? Does it build? – JuanR Mar 02 '23 at 18:55
  • I figured it out! Was a global repository path https://stackoverflow.com/questions/4092759/is-it-possible-to-change-the-location-of-packages-for-nuget#:~:text=Open%20%25AppData%25%5CNuGet%20folder,key%20and%20set%20new%20destination. Changed and rebooted, restore now pulls it all local (thank god) – Steve McNiven-Scott Mar 02 '23 at 20:19

1 Answers1

0

Resolution was a global respository config set somewhere, changed that rebooted and she's working!

https://stackoverflow.com/questions/4092759/is-it-possible-to-change-the-location-of-packages-for-nuget#:~:text=Open%20%25AppData%25%5CNuGet%20folder,key%20and%20set%20new%20destination.

Steve McNiven-Scott
  • 1,770
  • 2
  • 15
  • 29