1. Ben Slater
  2. PowerBuilder
  3. Friday, 7 October 2022 15:05 PM UTC

After migrating to PB 2022 from 2021, we are unable to create an instance of a .net class when running DotNetAssembly.CreateInstance() method. It's failing with error: "Bad runtime function reference" but all referenced dlls look good. This is failing with or without parameters passed in. 

After reverting back to 2021, all is functioning normally again. 

Wondering if anyone is having similar issues with this in 2022?




Accepted Answer
Peter Pang @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 11 October 2022 00:53 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Ben,


Thanks for reporting the problem! Please follow the four methods below to see if the problem can be solved. If the problem persists, please submit a ticket to the Support system and upload a small case there.

  1. Full build your application again.
  2. Please make sure that the called DLL is not occupied by other processes. When PB IDE is not closed, after it’s loaded once, it will also be occupied.
  3. Try running it using x86 and x64 separately in IDE and see if it works.
  4. If the problem happens when you run the EXE on the client, I suggest you install PB Runtime on the client using PowerBuilder Installer then try again. For details please refer to:




Best Regards,


There are no comments made yet.
Ben Slater Accepted Answer Pending Moderation
  1. Tuesday, 11 October 2022 16:36 PM UTC
  2. PowerBuilder
  3. # 1

I appreciate the response. After troubleshooting this with the PB installer, it was determined that we had failed up update the runtime pathway specified in the runtime path xml file. After updating this to the correct version, we have no more issues. 

Again, thank you for your help,


There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 October 2022 17:38 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ben;

  This could be related to PB 2022 using a much newer version of the C++ compiler and SnapDevelop using the new C# .NET 6.0 CORE compiler.

Please open a Support Ticket as per Francisco's suggestion in order for our Engineering team to delve deeper into this issue.

Many thanks in advance!

Regards ... Chris

  1. Donald Clayton
  2. Thursday, 1 June 2023 13:21 PM UTC
It would be great if .NET Core 6x was a Project option in SnapDevelop. Currently SD only supports up to Core 3.1.
  1. Helpful
  1. Andreas Mykonios
  2. Thursday, 1 June 2023 13:34 PM UTC

It's in SnapDevelop 2022. Target framework .NET 6.0... Maybe .net core isn't installed in your computer? Or are you using an older version of SnapDevelop?

  1. Helpful
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 October 2022 16:21 PM UTC
  2. PowerBuilder
  3. # 3

Hi Ben,

Please report this through the Support system in case it might be a bug.


There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.