Steve Fenton

NuGet Packager Visual Studio extension

This is a quick article that describes how to use the ace NuGet Packager Visual Studio Extension.

Step One

Download NuGet Packager using Tools > Extensions and Updates > Online (search for “NuGet Packager”).

Step Two

Add a new project to your solution, ideally name it exactly as you want your package to appear on NuGet, for example “tsUnit” if you want your package to end up at You don’t have to name it exactly like this, but it will mean you need to edit more of the settings that will be created for you.

Choose the NuGet Packager project type (just search for it in the new project dialog).

NuGet Packager Project

Step Three

Add your content. Use build events to push your libraries and content into the folders pre-added to your NuGet Packager project. There is a content, lib, src and tools folder waiting for you to add your cool stuff.

Step Four

Update NuGet.config… unless you are planning on publishing to the most likely place, NuGet (you can also add your organisation’s repository or any other NuGet repository).

<?xml version="1.0" encoding="utf-8"?>
    <add key="NuGet official package source" value="" />

Step Five

Update Package.nuspec… especially if you couldn’t name your project exactly as you wanted the package to be named.

<?xml version="1.0"?>
<package >
    <authors>Steve Fenton</authors>
    <owners>Steve Fenton</owners>
      An xUnit style framework for TypeScript with auto-discovery and assertions.
      An xUnit style framework for TypeScript with auto-discovery and assertions.
    <copyright>Copyright Steve Fenton 2012-2014</copyright>
    <tags>unit testing framework typescript</tags>
    <file src="lib\" target="lib" />
    <file src="tools\" target="tools" />
    <file src="content\Scripts\tsUnit\tsUnit.ts" target="content\Scripts\tsUnit\tsUnit.ts" />


When you build in Debug mode, you’ll get a “.nupkg” file in the root folder of your NuGet Packager project. Rename it to be a “.zip” file and have a check through it to see if contains everything you’d expect.

Double check your NuSpec file to make sure the id and title are spot on and that your project URL points to the most useful introduction to your project.

When you build in Release mode, it will automatically publish to NuGet. You’ll need your NuGet API key handy as it will prompt you to enter it. You only need to do this once.

Written by Steve Fenton on