I downloaded nuget.exe and I have tried the install. I would like to target a Visual Studio project so it adds a reference on the command line outside of Visual Studio. It is simply downloading the package with a version number on the end. MyOutputDirectory is the output directory which has a Visual studio solution there.
nuget install nhibernate -o MyOutputDirectory
Drop your NuGet package files in that folder. Go to your Project in Solution Explorer, right click and select "Manage NuGet Packages". Select your new package source.
The NuGet Command Line does not actually install any packages. The install command is actually doing a restore operation.
This means that nuget.exe install will only download and extract the package into the output location. It will not modify the project file (so no references are added, no content files injected, no transformations applied, no MSBuild files imported), and it will also not run any PowerShell scripts.
I do believe that a similar request to yours is being tracked by the NuGet team, but feel free to log an issue there: http://nuget.codeplex.com.
To answer your question: the NuGet Command Line does not support your scenario at this moment (nuget.exe v2.8).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With