Skip to content

Producing NuGet Packages (v1)

Darrell edited this page Dec 13, 2015 · 2 revisions

This documentation is specifically for version 1. For v2 see here.

DnnPackager supports producing one NuGet deployment package per DotNetNuke module / extension project in your solution. It also supports producing a single NuGet deployment package containing all of the DotNetNuke modules / extensions in your solution.

Produce NuGet Deployment Package for each Module.

In order to have NuGet deployment packages produced for each DotNetNuke module in your solution, you need to:

  1. Ensure DnnPackager NuGet package is added to your module's project.
  2. Ensure OctoPack NuGet package is added to your module's project.
  3. Ensure the msbuild property named CreateDeploymentNugetPackages is set to true. i.e if invoking msbuild.exe you would pass in /p:CreateDeploymentNugetPackages=true
  4. Ensure you have updated your module manifest with sensible values, and not left it empty or with default unreplaced tokens in.

If you have done all of this, but you are not seeing appropriate NuGet packages produced for your modules, then please raise an issue.

Controlling Version Number of NuGet Packages

The NuGet deployment package produced will have the same version number as taken from your modules manifest. However you can augment this in 2 ways.

The first way is you can:-

  • Set the msbuild property named BuildVersionNumber. i.e /p:BuildVersionNumber=12345

The version number in your dnn manifest file, appended with .BuildVersionNumber, must equal a valid NuGet package version number.

For example valid combinations would be (Manifest + BuildVersionNumber = NuGet Package Version Number)

  • 1.0.0 + 12345 = 1.0.0.12345
  • 2.0.1 + 0001 = 1.0.0.0001

Invalid combinations might be:

  • 1.0.0 + 1.1.1.a' = 1.0.0.1.1.1.a`

The second way is you can:

  • Set the msbuild property named OctoPackPackageVersion. i.e /OctoPackPackageVersion=1.0.1

This will set the NuGet package version number directly.

Produce a Single NuGet Deployment Package containing all Modules in your Solution.

In order to have a single NuGet deployment package produced containing all of your DotNetNuke module zips in your solution, you need to:

  1. Ensure DnnPackager NuGet package is added to your module's project.
  2. Ensure the msbuild property named CreateSolutionDeploymentPackage is set to true. i.e if invoking msbuild.exe you would pass in p:CreateSolutionDeploymentPackage=true
  3. Ensure you have updated your modules manifests with sensible values, and not left it empty or with default unreplaced tokens in.

If you have done all of this, but you are not seeing appropriate NuGet packages produced for your modules, then please raise an issue.