dotNetChris @ Marisic.Net

May 22, 2012

Nuget package creation harmony with Visual Studio

Filed under: Uncategorized — dotnetchris @ 6:41 pm

Over a year ago I opened a post on Nuget’s Codeplex detailing how creating packages, to put it bluntly, just sucked. Nuget has gone through several major releases since then. With current state of Nuget, it’s exceedingly easy to create projects that manage their nuget package creation automatically.

Steps to reach harmony

  1. Right click the solution root in the solution explorer < Enable Nuget Package restore (this should create you a .nuget folder that has nuget.exe in it)
  2. Right click the project you wish to turn into a package, properties and goto the build events tab
  3. In the post build event command line enter:

    “$(SolutionDir).nuget\Nuget.exe” pack “$(ProjectPath)” -Verbose -Properties Configuration=$(ConfigurationName)

Save the project changes, then build your project and you’ll see your packages dropping out in the relevant Bin\Debug or Bin\Release folders!

BloggingContext.ApplicationInstance.CompleteRequest();

About these ads

1 Comment »

  1. Fantastic, thank you!

    Comment by Happy User — June 2, 2013 @ 11:47 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 242 other followers

%d bloggers like this: