Hi There,(Com-Visible .net 4.0 assembly with PowerBuilder 9)
I have a peculiar issue with .net 4.0 assembly which is com-visible. We have a requirement where a powerbuilder application is supposed to invoke a method from a .net 4.0 assembly (dll). The following code is making the .net 4.0 dll com-visible.
<ComVisible(Tru e)> _
<ClassInterface (ClassInterface Type.AutoDual)> _
<ProgId("NamesS pace.ClassName" )> _
<Guid("123412 EB-ABCD-46C8-A902-123AC6EB466E")> _
<Serializable() > _
Public Class ClassName
It works perfectly when built using .net 2.0. but fails when using .net 4.0. when we try to connect to the assembly from powerbuilder it fails to connect and errors our with a "Cannot create an object" error. We tried building from a different machine and found that when built from a different machine even the .net 4.0 com-visible component works. It is able to connect.
The issue now is "The com-visible .net 4.0 assembly works when built from some machines and does not work when built from other machines." what may be the reason for this.
Any light on this will be really appreciated.
Thank you in advance.
I have a peculiar issue with .net 4.0 assembly which is com-visible. We have a requirement where a powerbuilder application is supposed to invoke a method from a .net 4.0 assembly (dll). The following code is making the .net 4.0 dll com-visible.
<ComVisible(Tru e)> _
<ClassInterface (ClassInterface Type.AutoDual)> _
<ProgId("NamesS pace.ClassName" )> _
<Guid("123412 EB-ABCD-46C8-A902-123AC6EB466E")> _
<Serializable() > _
Public Class ClassName
It works perfectly when built using .net 2.0. but fails when using .net 4.0. when we try to connect to the assembly from powerbuilder it fails to connect and errors our with a "Cannot create an object" error. We tried building from a different machine and found that when built from a different machine even the .net 4.0 com-visible component works. It is able to connect.
The issue now is "The com-visible .net 4.0 assembly works when built from some machines and does not work when built from other machines." what may be the reason for this.
Any light on this will be really appreciated.
Thank you in advance.
Comment