C# Class NuBuild.MSBuild.NuPackage

Package task
This task compiles a set of .nuspec items into a corresponding set of NuGet packages (.nupkg) files.
Inheritance: Microsoft.Build.Utilities.Task, NuGet.IPropertyProvider
Exibir arquivo Open project: bspell1/NuBuild

Private Properties

Property Type Description
AddDependencies void
AddLibraries void
AddNugetDependencies void
BuildPackage void
GetNuGetDependencies void
GetProjectProperty String

Public Methods

Method Description
Execute ( ) : System.Boolean

Task execution override

GetPropertyValue ( String property ) : dynamic

Retrieves nuget replacement values from a referenced assembly library or MSBuild property, as specified here: http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens

Private Methods

Method Description
AddDependencies ( NuGet builder ) : void

Go through each referenced project, and add any nuget dependencies from their packages.config file. Ignores any that have developerDependency=true

AddLibraries ( NuGet builder ) : void

Adds project references to the package lib section

AddNugetDependencies ( NuGet builder, string>.Dictionary packages ) : void

Inserts a dependency set into the packagebuilder object, based on a dictionary containing Id/version pairs (Newtonsoft.json, 5.0.6 for example).

BuildPackage ( ITaskItem specItem ) : void

Compiles a single .nuspec file

GetNuGetDependencies ( string packagesPath, string>.Dictionary packages ) : void

opens a packages.config file (if exists) and parses the nuget packages into a dictionary. dictionary key is the package id (ie, newtownsoft.json), and version is the semantic version string (ie 5.0.6) if there are 2 csproj's linked to the same nuproj, this also verifies that any shared packages share the same version. if they do not, throws an exception and stops.

GetProjectProperty ( String name ) : String

Retrieves a property from the current NuGet project file

Method Details

Execute() public method

Task execution override
public Execute ( ) : System.Boolean
return System.Boolean

GetPropertyValue() public method

Retrieves nuget replacement values from a referenced assembly library or MSBuild property, as specified here: http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens
public GetPropertyValue ( String property ) : dynamic
property String /// The replacement property to retrieve ///
return dynamic