Modifying a .NET Assembly Project
You can modify a .NET Assembly project from the Project painter.
In addition to the values for fields that you entered in the target and project wizards, you can also modify version, debug, and run settings from the Project painter, and select and rename functions of the nonvisual objects that you deploy to a .NET assembly.
Each .NET Assembly project has seven tab pages: General, Objects, Resource Files, Library Files, Version, Post-build, and Run.
General tab
The General tab in the Project painter allows you to modify the namespace, assembly file name, and setup file name for a .NET Assembly project. It also has a check box you can select to use .NET nullable datatypes. These fields are described in .NET Assembly Targets.
Project painter field | Description |
---|---|
Debug or Release | Options that determine whether the project is deployed as a debug build (default selection) or a release build. You use debug builds for debugging purposes. Release builds have better performance, but when you debug a release build, the debugger does not stop at breakpoints. |
Enable DEBUG symbol | Option to activate code inside conditional compilation blocks using the DEBUG symbol. This selection does not affect and is not affected by the project�s debug build or release build setting. This option is selected by default. |
Objects tab
The Objects tab in the Project painter lists all the nonvisual user objects available for deployment from the current .NET Assembly target. The Custom Class field lists all these objects even if you did not select them in the target or project wizard.
Objects that you selected in the wizard display with a user object icon in the Custom Class treeview. All methods for the objects selected in the wizard are also selected for deployment by default, but you can use the Objects tab to prevent deployment of some of these methods and to change the method names in the deployed component.
Project painter field | Description |
---|---|
Custom class | Select an object in this treeview list to edit its list of functions for inclusion in or exclusion from the assembly component. You can edit the list for all the objects you want to include in the assembly, but you must do this one object at a time. |
Object name, Class name, and Namespace | You can change the object name only by selecting a different object in the Custom Class treeview. By default, the class name is the same as the object name, but it is editable. In the Project painter, the namespace is editable only on the General tab. |
Method names and Function prototypes | Select the check box for each function of the selected custom class object you want to deploy to a .NET assembly. Clear the check box for each function you do not want to deploy. You can modify the method names in the Method Names column, but you cannot use dashes (�-�) in the modified names. The Function Prototype column is for descriptive purposes only. |
Change method name and description | You enable these buttons by selecting a method in the list of method names. PowerBuilder allows overloaded functions, but each function you deploy in an assembly class must have a unique name. After you click the Change Method Name button, you can edit the selected method name in the Method Name column. The Change Method Description button lets you add or edit a method description. |
Select All and Unselect All | Click the Select All button to select all the functions of the current custom class object for deployment. Click the Unselect All button to clear the check boxes of all functions of the current custom class object. Functions with unselected check boxes are not deployed to a .NET assembly. |
Resource Files and Library Files tabs
The fields that you can edit on the Resource Files and Library Files tabs of the Project painter are the same as the fields available in the target and project wizards. These fields are described in the first table in .NET Assembly Targets.
The Resource Files page of the Project painter does have an additional field that is not included in the project or target wizard. The additional field is a Recursive check box next to each directory that you add to the Resource Files list. By default, this check box is selected for each directory when you add it to the list, but you can clear the check box to avoid deployment of unnecessary subdirectory files.
Version, Post-build, and Run tabs
Project painter field | Description |
---|---|
Version tab: Product name, Company, Description, and Copyright |
Use these fields to specify identification, description, and copyright information that you want to associate with the assembly you generate for the project. |
Version tab: Product version, File version, and Assembly |
Enter major, minor, build, and revision version numbers for the product, file, and assembly. |
Post-build tab: Post-build command line list for build type | Select the build type (Debug or Release) and click Add to include command lines that run immediately after you deploy the project.
For example, you can include a command line to process the generated component in a code obfuscator program, keeping the component safe from reverse engineering. The command lines run in the order listed, from top to bottom. You can save separate sequences of command lines for debug and release build types. |
Run tab: Application | You use this text box to enter the name of an application with code that invokes the classes and methods of the generated assembly. If you do not enter an application name, you get an error message when you try to run or debug the deployed project from the PowerBuilder IDE. |
Run tab: Argument | You use this text box to enter any parameters for an application that invokes the classes and methods of the deployed project. |
Run tab: Start In | You use this text box to enter the starting directory for an application that invokes the classes and methods of the deployed project. |
Sign tab
The fields that you can edit on the Sign tab of the Project painter are the same as the fields available for other .NET projects, although one of the fields that permits calls to strong-named assemblies from partially trusted code is available only for .NET Assembly and .NET Web Service projects. For descriptions of the fields on the Sign tab, see Strong-Named Assemblies
.