Set properties for .NET Assembly targets and projects in the .NET Assembly wizard, and for .NET Assembly projects, in the Project painter.
For .NET Assembly targets that you create from scratch, provide the information described in this table:
| Wizard field | Description |
|---|---|
| Project name | Name of the project object the wizard creates. |
| Library | Name of the library directory the wizard creates. By default, this includes the current solution path and takes the name you enter for the project object with a PBL extension. |
| Target | Name of the target the wizard creates. By default, this includes the current solution path and takes the name you enter for the project object with a PBTX extension. |
| Library search path | Lets you add PBL directories to the search path for the new target. |
| Default namespace | Assigns a namespace for all objects in the target for which you do not explicity specify a different namespace. This namespace is saved in the project created by the wizard, but is not visible in the UI for the objects that you subsequently add to the target and deploy with this project. The default namespace is not available for selection from lists for objects in the target, and can be applied only to those objects by the compiler. Other projects in the same target can have different default namespaces that apply to the same objects. |
| Assembly file name | Name of the assembly that the wizard creates. By default, the assembly file name takes the namespace name with a DLL suffix. |
| PowerBuilder object name | Name of the nonvisual object the wizard creates. By default, the wizard adds an "n_" prefix to the name that you entered for a project object. |
| Description | Description for the nonvisual object the wizard creates. |
| Namespace | Provides a globally unique name to the nonvisual object that the wizard creates. |
| Using | List of namespaces to include in using directives. You can reference types or objects in scripts without qualifying them by namespace when the namespace they belong to is included in a using directive. |
| Interfaces to implement | List of interfaces that must be implemented by the nonvisual user object that the wizard creates. |
| Resource files |
List of resource files, or directories containing resource files, that you want to deploy with the project.
Use the buttons to add files or directories to the list box. When you add a directory, a check box appears next to the directory path in the list box. You can select this check box to add resources from subdirectories of the listed directory path. Select a file or directory in the list and click Delete to remove that file or directory from the list. |
| Win32 dynamic library file list | Specifies any Win32 DLLs you want to include with your project. Click Add to open a file selection dialog box and add a DLL to the list. Select a DLL in the list and click Delete to remove the DLL from the list. |
| Setup file name | Name of the setup file for the .NET Assembly project. Copy this MSI file to client computers, then double-click the files to install the .NET assembly on those computers. |
You can create a new .NET Assembly target from an existing target or by converting an existing .NET Assembly target from PowerBuilder Classic.
The Use the library list from an existing target option lets you select a source target from the current solution only. When you select this option, the wizard prompts you for the same information as when you create a target from scratch, but omits the PowerBuilder object name, description, and library search path fields. These fields are unnecessary because the existing target must have a usable nonvisual object, and the library search path for the target is already set. The wizard does, however, present the additional fields that are not available when you create a target from scratch:
| Wizard field | Description |
|---|---|
| Choose a target | Assigns a target from the list of targets in the current solution. This is the source target that you are copying to create a new target. After selecting a source target, the wizard prompts you for a new target name, a project name, and a project library, as described in the table listing wizard fields for a .NET Assembly target created from scratch. |
| Choose NVO objects to be deployed | Shows the nonvisual user objects to be deployed with the project. You can expand the library nodes and select check boxes next to each of the nonvisual objects you want to deploy. |
| Use .NET nullable types | Maps PowerScript standard datatypes to .NET nullable datatypes when selected. Nullable datatypes are not Common Type System (CTS) compliant, but they can be used with .NET Generic classes if a component accepts or returns null arguments, or if reference arguments are set to null. |
If you choose Convert an existing .NET assembly target, the .NET Assembly target wizard has only two editable fields—one for selecting the source target for conversion, and the other for assigning the location and name of the new .NET Assembly target. The wizard also displays a list of the libraries from the source target that you select.
Modify target properties in the Properties dialog box for the target. Enter and modify properties for projects in the Project painter.
The Project painter Win32 DLLs tab in PowerBuilder .NET replaces the Library Files tab in PowerBuilder Classic, and the Resource Files tab is removed. Resource files that you add in the wizard are automatically included under the Resources folder for the target in the Solution Explorer, and you can select Add New Item and Add Existing Item from the the target or Resources folder pop-up menus to include resource files in your target after you complete the wizard.
The Project painter includes fields that are not available in the wizard. These fields are described in Deploying Applications and Components to .NET for the PowerBuilder Classic .NET Assembly target. However, the .NET Assembly Project painter in PowerBuilder .NET also includes a Verify CLS Compliance check box on its General page. When this check box is selected, PowerBuilder .NET issues warnings on deployment of any object that is not compliant with the Common Language Specification (CLS).