Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the OutputDirectory for msbuild pack?

Tags:

nuget

msbuild

Previously using 'nuget', one could run 'nuget pack -OutputDirectory ../../output' for example. How can I do this with msbuild pack? I am using VS2017.

like image 329
tofutim Avatar asked Apr 24 '17 23:04

tofutim


People also ask

Does MSBuild restore NuGet packages?

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.

How do I get files from a NuGet package?

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.

How do I create a NuGet 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.

How many NuGet packages are there?

In its role as a public host, NuGet itself maintains the central repository of over 100,000 unique packages at nuget.org.


1 Answers

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.

like image 72
bernhof Avatar answered Dec 13 '22 04:12

bernhof