Packager Class

MSBuild Extension Pack

Packager Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

Pack (Required: Id, Version, Authors, Description, LibFiles, Optional: LicenseUrl, ProjectUrl, Title, ContentFiles, ToolsFiles, Owners, ReleaseNotes, CopyrightsText, IconUrl, RequireLicenseAgreement, Tags, Dependencies, References, FrameworkAssemblies)

Remote Execution Support: NA

Inheritance Hierarchy

SystemObject  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.NuGetPackager

Namespace: MSBuild.ExtensionPack.NuGet
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0

The Packager type exposes the following members.

Constructors

  NameDescription
Public methodPackager
Initializes a new instance of the Packager class.
Top
Properties

  NameDescription
Public propertyAuthors
Gets or sets a comma-separated list of authors of the package code.
Public propertyCode exampleContentFiles
Gets or sets the Files to be included in the contents folder of the package. Files in the content folder are copied to the root of your application when the package is installed.
Public propertyCopyrightText
Gets or sets the Copyright text of the NuGet package.
Public propertyDependencies
Gets or sets the Dependencies of the NuGet package. An Example of ItemGroup passed to this property net401.2.10
Public propertyDescription
Gets or sets the long description of the package.
Public propertyCode exampleFrameworkAssemblies
Gets or sets the Framework Assemblies that the deployed package is dependant upon.
Public propertyIconUrl
Gets or sets a URL for the image to use as the icon for the package in the Manage NuGet Packages dialog box.
Public propertyId
Gets or sets the Id of the NuGet package. is the package name that is shown when packages are listed using the Package Manager Console. These are also used when installing a package using the Install-Package command within the Package Manager Console. Package IDs may not contain any spaces or characters that are invalid in an URL.
Public propertyLanguage
Gets or sets the locale ID for the package, such as en-us.
Public propertyCode exampleLibraryFiles
Gets or sets the Files to be included in the lib folder of the package. Assemblies (.dll files) in the lib folder are added as assembly references when the package is installed.
Public propertyLicenseUrl
Gets or sets a link to the license that the package is under.
Public propertyNuGetExeDir
Gets or sets the directory containing the command line tool, NuGet.exe. If none is specified, will default to Resources directory of the currently executing assembly.
Public propertyOutputFile
Gets or sets the NuGet Output file
Public propertyOwners
Gets or sets a comma-separated list of the package creators.
Public propertyProjectUrl
Gets or sets a URL for the home page of the package.
Public propertyCode exampleReferences
Gets or sets the References files or the files which are added as reference by default. The collection should only contain the names of the files and not the path.
Public propertyReleaseNotes
Gets or sets the Release Notes of the NuGet package. This field only shows up when the package is an update to a previously installed package. It is displayed where the Description would normally be displayed.
Public propertyRequiresExplicitLicensing
Gets or sets the RequireLicense property which determines whether the NuGet package requires explicit license permissions or not. Default is false.
Public propertySummary
Gets or sets the summary, a short description of the package. If specified, this shows up in the middle pane of the Add Package Dialog. If not specified, a truncated version of the description is used instead.
Public propertyTags
Gets or sets the tags for the NuGet package. It should be a space-delimited list of tags.
Public propertyTitle
Gets or sets the Title text of the NuGet package. The human-friendly title of the package displayed in the Manage NuGet Packages dialog.
Public propertyCode exampleToolsFiles
Gets or sets the Files to be included in the tools folder of the package. The tools folder of a package is for powershell scripts and programs accessible from the Package Manager Console.
Public propertyVersion
Gets or sets the version of the package. The version of the package, in a format like 1.2.3.
Top
Examples

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <LibraryFiles Include="C:\Work\Community\MSBuildExtensionPack\Samples\Files\DotNet40\*.*">
       <Framework>net40</Framework>
     </LibraryFiles>
     <LibraryFiles Include="C:\Work\Community\MSBuildExtensionPack\Samples\Files\DotNet35\*.*">
       <Framework>net35</Framework>
     </LibraryFiles>
     <LibraryFiles Include="C:\Work\Community\MSBuildExtensionPack\Samples\Files\*.*" />
   </ItemGroup>
   <ItemGroup>
     <Dependencies Include="log4net">
       <Framework>net40</Framework>
       <Version>1.2.10</Version>
     </Dependencies>
   </ItemGroup>
   <ItemGroup>
     <FrameworkAssemblies Include="System.Data.Entity">
       <Framework>net40</Framework>
     </FrameworkAssemblies>
     <FrameworkAssemblies Include="System.ComponentModel.DataAnnotations">
       <Framework>net40</Framework>
     </FrameworkAssemblies>
   </ItemGroup>
   <Target Name="Default">
    <Packager TaskAction="Pack" Id="MSBuildExtensionPack" Description="MSBuildExtensionPack Sample NuGet Package" ProjectUrl="http:///www.nuget.org" LicenseUrl="http:///www.nuget.org" LibraryFiles="@(LibraryFiles)" OutputFile="MSBE.nupkg" Authors="Hamid Shahid" Owners="Hamid Shahid" Dependencies="@(Dependencies)" Version="1.0.0.0"/>
   </Target>
</Project>
See Also

Reference