0

I needed to create a .nupkg of my project, and in order to do this, I needed to install the nuget.exe and add it to Environment Variables.

I added it to the following:

User Variables:

  • Variable: PATH
  • Value: C:\Program Files\nuget

System Variables

  • Variable: PATH

  • Value: C:\Program Files\nuget

After adding the above, I opened my Visual Studio, and it will no longer restore my packages on the build.

Am I missing a step?

ArunPratap
  • 4,816
  • 7
  • 25
  • 43
monstertjie_za
  • 7,277
  • 8
  • 42
  • 73
  • You may need to go to Tools->Nuget Package Manager->Package Manager Settings and do the settings properly in General and Package Sources tabs.. – S2S2 Feb 11 '19 at 05:45
  • Can you be more specific? Under General settings, in Package Restore, both options are checked – monstertjie_za Feb 11 '19 at 05:49
  • Pls also chk Package Sources tab. It should have nuget.org &its uri path, and name & path of your own package source folder path. – S2S2 Feb 11 '19 at 05:57
  • Yes all is well there. Was always working, untill I added the PATH environemnt variable pointing to nuget.exe – monstertjie_za Feb 11 '19 at 06:05
  • Pls refer this SO QA: https://stackoverflow.com/questions/13056329/nuget-is-not-recognized-but-other-nuget-commands-working – S2S2 Feb 11 '19 at 06:18
  • How about change the nuget PATH environment variable to other folder, for example, `D:\nuget`. It works fine for me. If it still not work for you, please try to re-install the nuget package management with Visual Studio Installer. – Leo Liu Feb 11 '19 at 08:24
  • I'm not sure why you need to add nuget into the path. This is not usually a required step. What exactly are you trying to achieve? – tom redfern Feb 11 '19 at 09:38

0 Answers0