There is this folder c:\users\myname\.nuget which is created when I build something in visual studio 2015. Is there an option to move this folder?
Yes - as of NuGet 3.2 you can do that:
NuGet clients support specifying a global NUGET_PACKAGES environment variable to specify the location of the shared global packages folder used in project.json managed projects with Windows 10 tools v1.1.
https://docs.nuget.org/release-notes/nuget-3.2
We are also working on a way to define it in nuget.config and have all build tasks and project systems respect it, but since that is not depending just on NuGet I cannot comment on if and so a date when this will happen
Thanks for the quick reply. Wouldn't hurt to mention the name of the folder ".nuget" in the documentation. I tried several searches, but didn't find an answer or pointer to the nuget release notes. It's hard to search for something if you only have it's folder name.
Thanks for the feedback. I don't quite follow what you are suggesting to add, but you can follow the link on the bot to of the doc and suggest a change in the form of a PR :)
Sent from my Windows Phone
From: Tom Kuijstenmailto:[email protected]
Sent: ‎1/‎11/‎2016 12:40 AM
To: NuGet/Homemailto:[email protected]
Cc: Yishai Galatzermailto:[email protected]
Subject: Re: [Home] Is it possible to move the .nuget folder from my documents? (#1905)
Thanks for the quick reply. Wouldn't hurt to mention the name of the folder ".nuget" in the documentation. I tried several searches, but didn't find an answer or pointer to the nuget release notes. It's hard to search for something if you only have it's folder name.
—
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/1905#issuecomment-170467858.
Haha :) my bad. I wanted to say that it would be wise to add ".nuget" as text in that release note, so google will find it when I search for that name. But you're right, I should suggest a change myself.
I tried it and it affects more then I expected. All nuget packages are installed in the NUGET_PACKAGES folder, including the packages in packages.config. Result is that all references point to this new directory, which is not allowed by our development guidelines. I thought it would only affect the project.json ones, which don't have hard reference paths (and won't be confliciting with out development guidelines).
And again, my bad. I had some nuget.config file with a redirect for the package folder. Removed it and works like a charm now.
Awesome. Thanks!
Sent from my Windows Phone
From: Tom Kuijstenmailto:[email protected]
Sent: ‎1/‎11/‎2016 4:47 AM
To: NuGet/Homemailto:[email protected]
Cc: Yishai Galatzermailto:[email protected]
Subject: Re: [Home] Is it possible to move the .nuget folder from my documents? (#1905)
And again, my bad. I had some nuget.config file with a redirect for the package folder. Removed it and works like a charm now.
—
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/1905#issuecomment-170537014.
Most helpful comment
Yes - as of NuGet 3.2 you can do that:
NuGet clients support specifying a global NUGET_PACKAGES environment variable to specify the location of the shared global packages folder used in project.json managed projects with Windows 10 tools v1.1.
https://docs.nuget.org/release-notes/nuget-3.2
We are also working on a way to define it in nuget.config and have all build tasks and project systems respect it, but since that is not depending just on NuGet I cannot comment on if and so a date when this will happen