NuGet creation

NuGet creation
The last time I spoke as NuGet is used, this time it is logical to tell you how to create your NuGet package and place it on a shared hosting or on your own in a local directory, or else in the gallery.

Creating your own package NuGet

For example, and I think in most cases, you’ll create a package NuGet without dependencies on other packages. So we need any project, for simplicity let it be a simple library with the N- of methods.

In order to be able to set library or libraries to include in the final NuGet package, you must add the project file with the extension “.Nuspec“, where there will be described all the properties and the internal function of our package. So far, in the studio there is no setting to create the files required extensions, so that you can create any text file, and change it’s dwells.

In general, the nuspec file looks as follows:

<?xml version="1.0" encoding="utf-8"?>
    <title>Argument Parser library</title>
    <authors>Violet Tape</authors>
    <description>Easy to use library for parsing app arguments.</description>
    <file src="bin\Release\WBR.ArgParser.dll" target="lib" />


We can say that the comments here are irrelevant. The only thing that is necessary to specify is which tags are mandatory and which are optional.

Continue reading

NuGet using

Today I would like to talk about the use of NuGet. Surely you’ve heard something about this system of management of external dependencies. Recently, the system grows and more and more developers are putting their systems in the wrapper for distribution with the help of NuGet.

NuGet – a manager to control the dependencies on external libraries. With this tool you can install, update and remove according to your project with great ease. This applies both for the desktop software and the web. In particular, when expanding the CMS Orchard, she drags the half assembly during installation of the library on their own packages. There are examples of NuGet for Silverlight.

Notes from the back seats

When studying materials NuGet, a plus appears availability of shared libraries to your projects. Conditional opponents NuGet, or principled opposition asks why you need NuGet for their shared libraries, if there can be external to SVN, and other such things for VCS? So you can refer to the stable branch sources.

Developers NuGet answer that

  • do not control whether access to the version control system,
  • source code is not displayed to other groups
  • no need to monitor and switch to other audits by hand (maybe you want to jump from branch Release, to an earlier, or you are referring to an audit in trunk)

Quite good advantages. Especially now that your favorite library does not get lost among repositories and projects.

Continue reading