Strong-named assemblies

PowerBuilder 11.5 can generate strong-named assemblies from all .NET Project painters.

A strong name consists of an assembly's identity—its simple text name, version number, and culture information (when provided)—plus a public key and digital signature. It is generated from an assembly file using the corresponding private key. The assembly file contains the assembly manifest that includes the names and hashes of all the files that make up the assembly.

Project painter Sign tab

PowerBuilder 11.5 includes a new Sign tab in the Project painter for all .NET application and component projects. The Assembly group box on the Sign tab allows you to attach strong name key files to the assemblies that the.NET projects generate. The Assembly group box contains the following fields:

Assembly group box field

Description

Sign the assembly

Select this check box to enable the “Choose a strong name key file” single line edit box, the browse and New buttons, and the “Delay sign only” check box.

Choose a strong name key file

Name of the key file you want to attach to the generated assembly. This field is associated with a browse (ellipsis) button and a New button. The browse button opens a Select File dialog box where you can select a key file with the .snk or .pfx extension. The New button lets you create a key file with the .snk extension. PowerBuilder uses the Sn.exe tool from the .NET Framework SDK to create the key file.

Delay sign only

Select this check box if your company’s security considerations require the step of signing the assembly to be separate from the development process. When this check box is selected, the project will not run and cannot be debugged. However, you can use the strong name tool Sn.exe (in the .NET Framework SDK) with the -Vr option to skip verification during development.

Mark the assembly with AllowPartiallyTrustedCallerAttribute

(.NET Web Service and .NET Assembly projects only)

By default, a strong-named assembly does not allow its use by partially trusted code and can be called only by other assemblies that are granted full trust. However, you can select this check box to allow a strong-named assembly to be called by partially trusted code.

The Sign tab has additional fields for selecting certificate files that you publish with smart client applications.

The Intelligent Updater group box replaces the Certificate group box that was on the Publish tab of Windows Forms projects in earlier releases of PowerBuilder. It is grayed out for .NET Windows Forms projects when the Publish as smart client application check box on the General tab of the Project painter has not been selected, and it is not displayed on the Sign tabs of .NET Web Forms projects or .NET component projects (Web Service and .NET Assembly projects).

The Intelligent Updater group box contains the following fields:

Intelligent Updater field

Description

Sign the manifests

Select this check box to enable the Select from Store and Select from File buttons. Use the buttons to select a certificate from a certificate store or from your file system. If you select a valid certificate, its details display in the multiline edit box under the check box. If you do not specify a certificate, PowerBuilder attaches a test certificate automatically. Use test certificates for development only.

Select from Store

Click this button to view the certificates available in the local certificate store. Select a certificate from the Select a Certificate dialog box, then click View Certificate if you want to view its details, and click OK to select it.

Select from File

Click this button to view the certificates available in the local file system. Select a certificate with the .snk or .pfx extension from the Select File dialog box and click Open.

Error messages

If you select a strong name key file in either the Assembly or Intelligent Updater group boxes, and the key file is invalid, PowerBuilder displays a message box telling you that the key file is invalid. If the key file you select is password protected, PowerBuilder prompts you to enter the password for the key file. If you enter an incorrect password, a message box informs you that the password you entered is invalid.