Previously using 'nuget', one could run 'nuget pack -OutputDirectory ../../output' for example. How can I do this with msbuild pack? I am using VS2017.
Restore by using MSBuildYou can use msbuild -t:restore to restore packages in NuGet 4. x+ and MSBuild 15.1+, which are included with Visual Studio 2017 and higher. This command restores packages in projects that use PackageReference for package references.
on the toolbar of the Assembly Explorer window or choose File | Open from NuGet Packages Cache in the main menu . This will open the Open from NuGet Packages Cache dialog. The dialog lists packages from all NuGet cache locations on your machine. Use the search field in the dialog to find the desired package.
(Optional) Generate package on buildSelect your project in Solution Explorer, and then select Project > <project name> Properties, where <project name> is the name of your project (AppLogger in this case). Expand the Package node, select General, and then select Generate NuGet package on build.
In its role as a public host, NuGet itself maintains the central repository of over 100,000 unique packages at nuget.org.
Just to confirm what is mentioned in the comments: you can specify /p:PackageOutputPath="c:\output"
in which case the .nupkg files will be created in the "c:\output" directory.
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