JoelHT-Landmark / NuGet-PackageNPublish

Project template and packaging targets file to allow easier Package'n'Publish integration with TFS (or other CI) builds.
Other
13 stars 12 forks source link

Export package to a local folder for testing purpose. #12

Closed xied75 closed 11 years ago

xied75 commented 11 years ago

Dear Joel,

Can we have a setting so that the newly build package file can also be published into a local folder then one can use it as local NuGet source for testing?

Best,

Dong

JoelHT-Landmark commented 11 years ago

Actually, it's already there!

See http://docs.nuget.org/docs/reference/command-line-reference#Push_Command

Starting with NuGet 2.5 you can now push to a UNC/Folder source nuget.exe push -source \mycompany\repo\ mypackage.1.0.0.nupkg

So all you have to do is update nuget itself to v2.5 or later (navigate to the .nuget folder from a command prompt and execute

.\nuget.exe update -self

Then you can use a UNC path as the PublishNuGetPackageTarget property

/p:PublishNuGetPackageTarget=\\myserver\myshare\packages

Easy!