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"?> <package> <metadata> <id>WBR.ArgParser</id> <version>1.0.0</version> <title>Argument Parser library</title> <authors>Violet Tape</authors> <description>Easy to use library for parsing app arguments.</description> <language>en-US</language> <projectUrl>http://violet-tape.net</projectUrl> <iconUrl>http://violet-tape.net/images/commandprompt.png</iconUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> </metadata> <files> <file src="bin\Release\WBR.ArgParser.dll" target="lib" /> </files> </package>
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.