Creating a .NET Assembly Target

Create .NET Assembly targets from scratch or from an existing target that contains at least one nonvisual custom class object. You can also migrate .NET Assembly targets from PowerBuilder Classic to PowerBuilder .NET.

Use the .NET Assembly wizard in the PowerBuilder .NET New dialog box to create a .NET Assembly target.

Note: If you prefer to enter values for the .NET Assembly target in the Project painter, click Finish at any time it is enabled.
  1. Select File > New, or open the New dialog box from the toolbar.
  2. From the Target category, select .NET Assembly and click Next.
  3. Specify how to create the .NET assembly:
    • From scratch
    • By converting a PowerBuilder Classic .NET Assembly target
  4. Optional: If you are creating the target from scratch, you can choose whether to generate an initial object—Custom Visual, Custom Nonvisual, standard nonvisual objects, or None—on the page Specify an object to create.
  5. Follow the remaining instructions in the .NET Assembly wizard and click Finish.

When you use the .NET Assembly target wizard to create a target from scratch, the wizard also creates an Application object, a project object that allows you to deploy the assembly, and a nonvisual object (NVO). However, you must add and implement at least one public method in the wizard-created NVO before you can use it to create a .NET assembly.

If you selected the option to use an existing target, the wizard creates only the .NET Assembly target and a .NET Assembly project. The target you select must include at least one NVO that has at least one public method. The public method must be implemented by the NVO or inherited from a parent. The AutoInstantiate property of the NVO must be set to false.