Problem with Visual Designer and Assemblies

Posted by cooper on 19-Feb-2015 07:37

Hello,


I use OpenEdge 11.3.2.

I have two projects in the DevStudio with two different assembly directories.
I have created a custom .Net control in which i have added a new property.
This new assemly is only in the second project.
The first project still has the older version without the new property.
I added the updated assembly to the second project updated the view and tested it, everything worked fine.

Today i tried to reopen the Form and got the following error:
Visual Designer cannot load this classs: Live 202: Unable to locale element custombutton.color in type myControl
When i close the first project in the DevStudio restart and open the Visual Designer again, everything works.
It seems the Visual designer uses the assembly of the first project and not the assemly from my project.
So it seems the Visual Designer uses the assembly that is loaded first. (?)
I have the assemlies referenced in the project settings but i also tried it with the -assembly startup parameter, same result.
I can also compile and run the program without any error so this is only a problem with the Visual Designer.

Does anyone know a solution for this?



Posted by Matt Baker on 19-Feb-2015 09:03

PDSOE uses a .DLL loaded into the JVM to access .NET libraries.  This .DLL acts as a bridge between the java code and the .NET reflection for reading details of the classes from an assembly.  Since this .DLL only uses a single AppDomain to load the .NET assemblies, it cannot support loading multiple versions of the same assembly at the same time.  So the first version of an assembly loaded into memory wins.

In contrast, the ABL compiler is hosted by the AVM which runs in a separate process.  So by having two separate projects, you have two separate runtimes which don't interact and you can safely compile against two different versions of your assembly.  If you tried using the shared AVM configuration you'd run into the same problem that PDS is having.

You will need to use separate workspaces to host different versions of your project.  And contact tech support to request an enhancement request to have the .NET bridge in PDS enhanced to support multiple app domains for separate projects.

All Replies

Posted by Matt Baker on 19-Feb-2015 09:03

PDSOE uses a .DLL loaded into the JVM to access .NET libraries.  This .DLL acts as a bridge between the java code and the .NET reflection for reading details of the classes from an assembly.  Since this .DLL only uses a single AppDomain to load the .NET assemblies, it cannot support loading multiple versions of the same assembly at the same time.  So the first version of an assembly loaded into memory wins.

In contrast, the ABL compiler is hosted by the AVM which runs in a separate process.  So by having two separate projects, you have two separate runtimes which don't interact and you can safely compile against two different versions of your assembly.  If you tried using the shared AVM configuration you'd run into the same problem that PDS is having.

You will need to use separate workspaces to host different versions of your project.  And contact tech support to request an enhancement request to have the .NET bridge in PDS enhanced to support multiple app domains for separate projects.

Posted by cooper on 20-Feb-2015 06:20
This thread is closed