Skip to main content

Package Builder Console

The Package Builder Console allows you to easily package DLLs into a deployable package file (.spk). The Package Builder Console is designed to work in an automated build environment.

Package Builder Console Parameter Reference

The following command line parameters are available for the Package Builder Console:

ParameterDescription
/pkdesc:<path to pkdesc file>The path and file name to the package description file (.pkdesc).
/target:<package file>The path and file name to the package file (.spk) to create.
/refpath:<path to referenced assemblies>A list of paths to assemblies that are referenced in the package. Each path shall be separated by semi-colon.
/basefolder:<path to base folder>The path to the base folder. All paths in pkdesc files will be interpreted relative to the base folder.
/cert:<cert>The path to the certificate file to sign packages with.
/password:<cert password>The password for the certificate file.
/timestamp:<timestamp>The URL of a timestamping module to timestamp packages with.
/packageversion:<package version>Version for the package. Format Major.Minor.ServicePackLevel.BuildNumber. This switch overrides the number in .pkdesc.
/intendedclient:<intended client>The client type for which the package is built. Can be set to type 'any', 'professional' or 'web'. Defaults to 'professional'.
/wpcontentfolder:<Web Player content folder>The name of the folder within the web server where the Web Player is installed. Only valid for internal Web Player packages.
/helpShow help on command line options.
/?Show help on command line options.
/usageShow usage of command line options.

The command line parameters are unordered and not case sensitive.

Package Description File

A package description file (.pkdesc) must be provided and it is written in an xml-format. Many of the command line parameters can be specified in the .pkdesc file. If this is done you do not need to specify the parameter on the command line. If a parameter is specified both in the file and on the command line, then the command line specification takes precedence over the file specification.

The following section contains an example of a .pkdesc file:

<?xml version="1.0"?>
<!-- A package description for a Spotfire Web Player Package that includes all possible elements and attributes. -->
<!-- The following attributes can be specified. -->
<!-- SchemaVersion: Required. Shall be 2.0. -->
<!-- Name: Required. The name of the package. -->
<!-- Version: Required. The version number of the package. Must contain 4 numbers separated by dots. -->
<!-- SeriesId: Required. A GUID that uniquely identifies the package. -->
<!-- IntendedClient: Optional. One of: "any" -> works in any client type, 
                                       "professional" -> works in Spotfire Professional only, 
                                       "web" -> works in Spotfire Web Player only. 
                                       Default is "professional". -->
<!-- WebPlayerContentFolder: Optional. Web Player only. The relative folder in the web player where the unpacked files shall be put. 
     Do not use this unless necessary. -->
<PackageDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                    SchemaVersion="2.0" Name="An example package description" Version="1.10.23.44" 
                    SeriesId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" IntendedClient="Web" WebPlayerContentFolder="webroot">

  <!-- A File element that refers to an assembly with compatibility information specified. -->
  <!-- The following attributes must be specified for a File element. -->
  <!-- SourceFile: Required. The path and name of a source file that shall be included in the package. -->
  <!-- TargetFilename: Required. The relative path and name for the file in runtime. -->
  <!-- Type: Required. One of "assembly" or "file". 
                       "Assembly" means that the file is a .NET assembly that will be validated against the other files. 
                       "File" means a file that is just copied to the package. -->
  <File SourceFile="folder1/Assembly1.dll" TargetFilename="webroot/bin/Assembly1.dll" Type="Assembly">
    <!-- Compatibility element. Optional. -->
    <!-- The following attributes must be specified for a Compatibility element. -->
    <!-- Min-version: Required. The minimum version of the client that this assembly is compatible with. Default is 0.0.0.0. -->
    <!-- Max-version: Required. The maximum version of the client that this assembly is compatible with. Default is #.#.*.*. -->
    <!-- Note '#' means compatible with the corresponding digit in the version number, '*' means any number from 0 to 65535 -->
    <Compatibility Min-version="1.0.0.0" Max-version="#.#.*.*" />
  </File>
  
  <!-- A File element that refers to an assembly without compatibility information specified. -->
  <File SourceFile="folder2/Assembly2.dll" TargetFilename="webroot/bin/Assembly2.dll" Type="Assembly"/>
  
  <!-- A File element that is not an assembly, just a copied file. -->
  <File SourceFile="folder2/SingleFile.dll" TargetFilename="webroot/bin/SingleFile.dll" Type="File" />

  <!-- A File element that is not an assembly and that contains a resource identifier. -->
  <File SourceFile="folder2/FileThatCanBeReferenced.txt" TargetFilename="webroot/bin/FileThatCanBeReferenced.txt" Type="File">
    <!-- ResourceIndentifier element. Optional. -->
    <!-- A ResourceIndentifier is a named resource that is possible to reference through the ModulesService API. -->
    <!-- The following attributes can be specified for a ResourceIdentifier element. -->
    <!-- Name: Required. The name of the resource that will be used when referencing it through the ModulesService API. -->
    <!-- Culture: Optional. The culture for the resource. This is mainly used for localized help files. -->
    <ResourceIdentifier Name="file.that.can.be.referenced.txt" Culture="sv-SE"/>
  </File>

  <!-- A Folder element with potential sub-folders that shall be included. -->
  <!-- The following attributes must be specified for a Folder element. -->
  <!-- SourceFolder: Required. Path to a folder from where all files except any exceptions specified by "ExcludePrefix" shall be copied. 
                               This also includes all sub folders. -->
  <!-- TargetFolder: Required. The relative path to the the folder where the files shall reside in runtime. -->
  <Folder SourceFolder="folder3" TargetFolder="webroot">
    <!-- ExcludePrefix element. Optional. A string specifying that files/folders beginning with this prefix shall be excluded from the copy.-->
    <!-- In this example, the bin folder will be excluded. -->
    <ExcludePrefix>bin</ExcludePrefix>
    <!--  A file that shall be excluded. -->
    <ExcludePrefix>Example web.config</ExcludePrefix>
    <!-- All files and folders beginning with '_' is excluded. -->
    <ExcludePrefix>_</ExcludePrefix>
  </Folder>
  
  <!-- A file declaration that has a target filename called 'module.xml' means that a copy of the module definition will be 
       stored in the source file. Note that any settings in the original target file will be overwriten. -->
  <File SourceFile="folder4/Example.module.xml" TargetFilename="module.xml" Type="File" />
  
</PackageDescription>

The parameters specified in the .pkdesc file are appended to the command line arguments.

Output Results

The output after using the Package Builder Console is a package file (.spk) that can be distributed and deployed to a Spotfire Server. If specified in the package description file you will also receive a module definition file (module.xml).