Updating the Collected-Packages.zip File

The Publishing Service requires a Collected-Packages.zip file, containing various software packages, which are used to compile an application during the publishing process. One of the included software packages may vary based on the client’s computer’s configuration. If your server configuration changes, for example, after an upgrade, you may need a different package version to be able to publish applications.

If you see a package error in the Details section on the Publishing status page similar to the following:

Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 8.0.5)

you need to update the Collected-Packages.zip file.

To determine version number, create package file, and replace package file

Perform the following steps to update the required Collected-Packages.zip file:

  1. After performing an upgrade or other TWC server configuration, figure out the required version number from the error message of the Publishing Service, found in the Details section on the Publishing page in the Canvas Web Settings or in the Publishing Service log file, for example:

[09:45:57 DBG ApplicationConverter] C:\CygNetTWC\TWC.PublishingService.WorkingFolder\ClientApp\TWC.Service.Client\TWC.Service.Client.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 8.0.5) [C:\CygNetTWC\TWC.PublishingService.WorkingFolder\ClientApp\TWC.Service.Client.Publishing.sln]

Note: The error message may differ depending on your setup; it may contain any of these three packages:

"Microsoft.NET.ILLink.Tasks"

"Microsoft.NET.Sdk.WebAssembly.Pack"

"Microsoft.NETCore.App.Runtime.Mono.browser-wasm"

Regardless of the package mentioned in the error message, you still need to update the Collected-Packaged.zip file. Proceed to the next step.

  1. A PowerShell script, PackageDownloader.ps1 script, is provided to create a supplemental package file. Run the C:\CygNetTWC\Tools\PackageDownloader.ps1 script and enter the version number needed, e.g., 8.0.5, from the error message.
    The script will create a supplemental Collected-Packages-xxx.zip (with a name similar to "Collected-Packages-9bdcd1d1-fc71-48cc-94e5-5e8c109205f4.zip") in the folder where the PackageDownloader.ps1 was run.
  1. Copy and paste the supplemental Collected-Packages-xxx.zip file to the TWC.PublishingService.Server folder, which is usually "CygNetTWC\\TWC.PublishingService.Server\\Collected-Packages.zip"

Note: The location of the Collected-Packages.zip file is stored in the "PackagesZipPath" key in the Config\configuration.json file, for example:

"PackagesZipPath": "C:\\CygNetTWC\\TWC.PublishingService.Server\\Collected-Packages.zip",

Make sure you paste the Collected-Packages-xxx.zip file to the folder listed in the "PackagesZipPath" key.

See Using the Configuration.json File for more information.

  1. The next Publishing action will use the newly added package and finish without error.

Important: The PackageDownloader.ps1 script requires an Internet connection. If the server machine where TWC services are running is not connected to the internet, the PackageDownloader.ps1 must be run on a different machine (one with an Internet connection) and the Collected-Packages-xxx.zip must be copied manually (with a USB drive or similar) to the TWC.PublishingService.Server folder on the server machine.