Nuget packages in user folders
Apologies if this question has been answered before. We have several users running LINQPad queries on a server VM. Our binaries make use of a lot of nuget packages, which need to be downloaded even if the query does not make use of them. I am observing about 6 GB of space in the .nuget folder under each user.
Is it possible for LINQPad to store nuget packages in the same place for all users?
Related: I am also seeing a lot of space in use in c:\Users\\AppData\Local\LINQPad\WebView2. It seems like there are binaries from several versions there, even though we only use the latest version. Is this something that we can address as well?
Comments
You could try overriding the NUGET_PACKAGES environment variable:
https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
However, using a common folder for multiple users could lead to issues with locking and performance - I'm not whether this is a supported scenario.
The WebView2 folder should contain only the latest two versions (or for a short period of time after an update, three versions). LINQPad has to be careful with automatic cleanup not to remove a folder that might still be in use by another instance of the executable that might be running. LINQPad creates the WebView2 folder only when the WebView2 common runtime has not been installed or fails to initialize. You can download the common runtime here:
https://developer.microsoft.com/en-us/microsoft-edge/webview2
Note that with all of these folders, you can safely delete them and LINQPad will recreate them if needed when restarted.