Troubleshooting deployment errors

The deployment process has two steps: the PowerBuilder to C# emitter (pb2cs) runs, then the project is compiled. Errors are written to the output window, and the progress of the deployment process is written to the DeployLog.txt file.

PB2CS errors

If pb2cs fails, make sure that:

If pb2cs fails and your application has any objects or controls whose names include dashes, open a painter with a Script view and select Design>Options from the menu bar. Make sure the Allow Dashes in Identifiers option is selected on the Script page in the Design Options dialog box.

If your application uses local structures in inherited objects, the .NET project might fail to deploy. To deploy the project successfully, replace all local structures defined in inherited objects with global structures. Also, your application must not include calls to functions, such as ToString, on primitive .NET datatypes, such as System.String, that map to PowerBuilder datatypes. See Table 14-3 for the list of datatype mappings from .NET to PowerBuilder.

If your application uses conditional compilation blocks, see “Limitations” to make sure that you have not used any .NET classes, interfaces, or methods in ways that are not supported.

You should also read “Coding restrictions” and “Design-level considerations”.

Errors that display in the Output window with a C0 prefix, such as error C0312, are generated by the PowerBuilder compiler. There is a link from these errors back to the source code in PowerBuilder painters. Explanations for PowerBuilder compiler errors can be found in the online Help.

Build errors

If there is a build failure, make sure the 2.0 version of the .NET Framework is installed and is listed in your PATH environment variable before any other versions of the .NET Framework.

Errors that display in the Output window with a CS prefix, such as error CS0161, are generated by the Microsoft C# compiler. There is no link from these errors back to the source code in PowerBuilder painters. Explanations for C# compiler errors can be found at the Microsoft Web site.

Runtime errors

If a Web Forms application displays a blank page, or if any .NET application or component produces unexpected errors, make sure that the PowerBuilder runtime files on the target computer or server have the same version and build number as the PowerBuilder files on the development computer.