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
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
Name | Description | |
---|---|---|
Packager |
Initializes a new instance of the Packager class.
|
Properties
Name | Description | |
---|---|---|
Authors |
Gets or sets a comma-separated list of authors of the package code.
| |
ContentFiles |
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.
| |
CopyrightText |
Gets or sets the Copyright text of the NuGet package.
| |
Dependencies |
Gets or sets the Dependencies of the NuGet package.
An Example of ItemGroup passed to this property
net401.2.10 | |
Description |
Gets or sets the long description of the package.
| |
FrameworkAssemblies |
Gets or sets the Framework Assemblies that the deployed package is dependant upon.
| |
IconUrl |
Gets or sets a URL for the image to use as the icon for the package in the Manage NuGet Packages dialog box.
| |
Id |
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.
| |
Language |
Gets or sets the locale ID for the package, such as en-us.
| |
LibraryFiles |
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.
| |
LicenseUrl |
Gets or sets a link to the license that the package is under.
| |
NuGetExeDir |
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.
| |
OutputFile |
Gets or sets the NuGet Output file
| |
Owners |
Gets or sets a comma-separated list of the package creators.
| |
ProjectUrl |
Gets or sets a URL for the home page of the package.
| |
References |
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.
| |
ReleaseNotes |
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.
| |
RequiresExplicitLicensing |
Gets or sets the RequireLicense property which determines whether the NuGet package requires explicit license permissions or not.
Default is false.
| |
Summary |
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.
| |
Tags |
Gets or sets the tags for the NuGet package. It should be a space-delimited list of tags.
| |
Title |
Gets or sets the Title text of the NuGet package. The human-friendly title of the package displayed in the Manage NuGet Packages dialog.
| |
ToolsFiles |
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.
| |
Version |
Gets or sets the version of the package. The version of the package, in a format like 1.2.3.
|
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