Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Programming and Learning from SD

I’ve used this Nuget Packager Extension for Visual Studio with success. There are 7 well defined steps to show how to create the package. You can create a package and drop it on a network drive and you have a NuGet server!

Note: Some people like to get the latest from updates to dll immediately for Continuous Integration. NuGet is a pull when you want to system. If you want updates on build, then write batch files and integrate them into your project folder.

Here are a few notes I wrote for others using this in the company.

To add it to available sources
Add a local package source in Visual Studio
- right click solution
- click manage NuGet Packages
- click Settings
- Click the plus button
- Change the name to {name you want}
- Change the source to {your network drive}
- Click ok

To consume:
Right click on the solution and click Manage NuGet Packages
- chose {that name} in the Online expanded area on the left
- click install
- choose your project
- click ok

If there is a Error: Error HRESULT E_Fail has been returned from a call to a COM component,
    make sure the packages.config file in the project is checked out for edit and try again.

Enable Package restore on the solution
  - this will make it so you don't have to have the dlls checked into TFS, though you may want to check in this dll (your choice)
  - the build server and all devs (default in 2013, but not 2012) will have to have this enabled in VS tools => options => Package Manager as well
  -> right click the solution
    - click enable NuGet Package Restore

    change the NuGet.targets in the .nuget folder of your solution to include our custom NuGet Package source
    in  <ItemGroup Condition=" '$(PackageSources)' == '' ">
    add    <PackageSource Include="{your network drive}\NuGet" />

To update Package
--- There should be some review before updating the package if there are going to be breaking changes! --

Update the version in the package.nuspec of the {X}.NuGet.Packager project and the assembly so that people using the NuGet feed will get a notification when they
* Manage Packages in the solution (under the update page).
* Update the assembly version info to the same version #.
* Build in Release mode.
* Manually copy {your network drive}.#.#.#.#.nupkg

Posted on Friday, February 20, 2015 2:04 PM | Back to top

Comments on this post: NuGet Packager Extension for Visual Studio

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Aligned | Powered by: