I try to use the new C# Class Importer, which allows PowerBuilder to use .NET assemblies directly without having to first create a COM Callable Wrapper for them.
i have this error:
some ideas ?
Thanks
I try to use the new C# Class Importer, which allows PowerBuilder to use .NET assemblies directly without having to first create a COM Callable Wrapper for them.
i have this error:
some ideas ?
Thanks
Just ideas:
1) compile with a different version of .net: try 4.5.1 or 4.7.x (.net core?)
In the help file, "about c# assembly", you'll find this information:
The C# assembly supported by PowerBuilder must be developed on .NET Framework 4.0 or later or .NET Standard 1.0 or later. And the assembly DLL file will require the corresponding version of .NET Framework to run, especially if the DLL file is a .NET Standard class library. Please check the Microsoft website or the following table for the compatible versions between .NET Standard and .NET Framework.
4.0 is missing in this table. Also I've tried 4.7.1 and that worked. I find the whole compatibility thing quite confusing to be honest.
2) in the assembly, do not mark the dll as COM visible. I only did a small test so far and did not mark the DLL as com visible and it worked. I'm not sure if that's important though.
- that's all I can think of
If you are using Nuget Packages the C# Importer Cannot find them. So be aware of that. You can copy the nuget library to a publish directory to bypass. Also, it looks like it only support primitives right now, so any complex C# classes in the methods or return values doesn't seem to be supported. Can anyone else confirm that?
Hi ATK,
I suggest you verify Miguel's suggestion and see if it works for you.
If not, I also suggest you report this issue to our support ticketing system :https://www.appeon.com/standardsupport/newbug
and provide a sample test case for us to reproduce it.
Just ideas:
1) compile with a different version of .net: try 4.5.1 or 4.7.x (.net core?)
In the help file, "about c# assembly", you'll find this information:
The C# assembly supported by PowerBuilder must be developed on .NET Framework 4.0 or later or .NET Standard 1.0 or later. And the assembly DLL file will require the corresponding version of .NET Framework to run, especially if the DLL file is a .NET Standard class library. Please check the Microsoft website or the following table for the compatible versions between .NET Standard and .NET Framework.
4.0 is missing in this table. Also I've tried 4.7.1 and that worked. I find the whole compatibility thing quite confusing to be honest.
2) in the assembly, do not mark the dll as COM visible. I only did a small test so far and did not mark the DLL as com visible and it worked. I'm not sure if that's important though.
- that's all I can think of
Most of my testing I've done using .NET Standard 2.0.
I suggest compiling for .NET Standard when possible since that allows your assembly to run on both .NET Framework and .NET Core.