Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create a Nuspec xml file that conforms to the Nuspec declaration requirement. Details around required fields and documentation around how the fields are used can be found at the Codeplex Site.
How to use the Nuspec task
Here is an example of how to use the Nuspec task
desc "create the nuget package" nuspec do |nuspec| nuspec.id="myprojectid" nuspec.version = "1.2.3" nuspec.authors = "Jon Jones" nuspec.description = "my-project is a collection of utilties" nuspec.title = "my-project" nuspec.language = "en-US" nuspec.licenseUrl = "http://me.com/license" nuspec.projectUrl = "http://me.com" nuspec.dependency "Autofac", "220.127.116.110" nuspec.working_directory = "Build/Deploy" nuspec.output_file = "fluentworkflow.nuspec" nuspec.file "..\tools\\*.exe", "tools" nuspec.framework_assembly "System.CoreEx", "net40" nuspec.framework_assembly "System.Reactive", "net40" end
##Required Properties id This is the unique identifier associated with the package. If you are building a nuget package for public deployment, this is the one you register with the nuget site.
version This is the version of the package in a format like 1.2.3. See the http://nuget.codeplex.com for more discussion about the mechanics of the version number declaration.
authors A comma separated list of the authors of the package code.
description A description of the package.
##Optional Properties title A human friendly title of the package.
owners A comma separated list of the package creators.
summary A summary of the package.
language A locale ID for the package, such as en-us
projectUrl A URL for the home page of the package.
iconUrl A URL for the image to use as the icon for the package.
licenseUrl A link to the license that the package is under.
requireLicenseAcceptance A boolean value that specifies whether the client needs to ensure that the package license is accepted before the package is installed.
tags A space delimited list of tags and keywords that describe the package.
##Specifying Files to Include in the Package (optional - you can alternately rely on nuget convention)
file src target (may be called 0..n times) The file method adds a file or file(s) to be included in the package.
- src declares the file name specification that can include wildcards according to rules called out in the nuget specification.
- target declares the destination folder under the package contents where this is to be installed.
##Specifying Dependencies (optional)
dependency id, version (may be called 0..n times) This method requires an id and version to be passed in. The id declares the package that this software is dependent upon. The version declares the version number required. Check the nuget documentation on how to declare version ranges using interval notation.
##Specifying Framework Dependencies (optional)
framework_assembly id, (net40|net35|net20|mono|wp7|...) (may be called 0..n times) This method requires an id and a framework version to be passed. When the package is subsequently referenced the specified framework assemblies should automatically be referenced.