obiwanjacobi / vst.net

Virtual Studio Technology (VST) for .NET. Plugins and Host applications.
https://obiwanjacobi.github.io/vst.net/index.html
GNU Lesser General Public License v2.1
420 stars 52 forks source link

Could not find nuget package location. #50

Closed Becks723 closed 2 years ago

Becks723 commented 3 years ago

Failed to build my host project after adding the host package. I tried to look into error details, then i found the command line did not find my correct nuget path.

see: https://github.com/obiwanjacobi/vst.net/blob/33283e85eb80f74b39fb472d844a01ebda387b8a/Source/Code/Jacobi.Vst.CLI/FileExtensions.cs#L8

Some time before i moved my package location to D disk because my C disk is too full. It's now on "D:.nuget\packages". So what should i do to make command line recognize the new location?

obiwanjacobi commented 3 years ago

As you can see the location of the nuget packages is hard-coded. How did you change the nuget package location?

Becks723 commented 3 years ago
  1. first move the .nuget folder to the destination (in my case D:.nuget)
  2. next modify nuget.config (located in C:\Users\Becks723\AppData\Roaming\NuGet in my case): add xml node <config> <add key="globalPackagesFolder" value="D:\.nuget\Packages" /> </config>, then save. Done.

But i'm now not using the nuget package but building my custom dlls, manually referencing them.

Just suppose better ways instead of the hardcoded location, to get user-specific nuget path. However currently I don't have any idea about it.

obiwanjacobi commented 3 years ago

Thanks. Agree that hardcoding the path is sub-optimal. I think I will try to read the nuget config as well... I see there is also an environment variable that Nuget supports: NUGET_PACKAGES. Perhaps I can support that too.

obiwanjacobi commented 2 years ago

Will be fixed in next release. https://github.com/obiwanjacobi/vst.net/blob/75bc44e4e13d7827377e660fd3fc28641132ce81/Source/Code/Jacobi.Vst.CLI/FileExtensions.cs#L8

obiwanjacobi commented 2 years ago

VST.NET2 v2.03 should fix this.