C
C#2y ago
Thinker

Hypothetical, downloading a Nuget package to a specific location [Answered]

This is just a hypothetical and it's not part of anything I'm doing currently. Would it be possible to download a Nuget package to a specific location/directory, for the sake of then dynamically loading the package assembly from a program?
9 Replies
WhiteBlackGoose
Of course You can just download and unpack it Shell, but you get the point
package=...
version=...
wget https://www.nuget.org/api/v2/package/$package/$version
mv $version $version.zip
unzip $version.zip
ls lib/netstandard2.0
package=...
version=...
wget https://www.nuget.org/api/v2/package/$package/$version
mv $version $version.zip
unzip $version.zip
ls lib/netstandard2.0
Thinker
Thinker2y ago
oh cool Haven't really used the Nuget API, so cool that it's apparently so easy
WhiteBlackGoose
there's no api used though ah you mean the link I got it by clicking "Download the package" on the nuget.org package page lol
Thinker
Thinker2y ago
ah
Jayy
Jayy2y ago
You can also just curl that url with -o filename
Thinker
Thinker2y ago
Does that just download the content at the URL to a file? Sorry haven't used CURL Okay that's neat
Jayy
Jayy2y ago
essentially
Thinker
Thinker2y ago
Okay I tried doing this in C# and it works flawlessly
Accord
Accord2y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server
More Posts