System.TypeLoadException when running deployed software! Bug

Posted by Haikarainen on 21-May-2012 07:55

I have come across a strange problem, when programming, compiling and running locally(as well as on other machines in the office) our software runs smoothly with no strange errors.

We recently decided to make sure the deployed software would run nicely as well, this is where my problem is; After compiling and setting up a deployment with WebClient Application Assembler,

as well as installing an instance of the deployed software and running it,it quickly throws an exception in swedish:

System.TypeLoadException: Det gick inte att läsa in typen Progress.Util.ResourceManager från sammansättningen Progress.NetUI, Version=10.2.2.1334, Culture=neutral, PublicKeyToken=null.

This means something like:

System.TypeLoadException: Could not read type Progress.Util.ResourceManager from assembly Progress.NetUI, Version=10.2.2.1334, Culture=neutral, PublicKeyToken=null.

I did some thinking and reading, but can not really figure out how this problem can arise (I'm pretty sure the used assemblies are deployed correctly, checked all assemblies in WCAA as well as deployed the assembliesdirectory and setting the -assemblies-variable).

My guess is that WCAA or any other software is neglecting Progress.NetUI or something, or that an assembly simply references ResourceManager without telling it in what assembly it is implemented.

Anyhow I tracked down the problematic code, wich is in the constructor of our Window-class(designable, code is generated from visual designer):;

      DEFINE VARIABLE resources AS Progress.Util.ResourceManager NO-UNDO.
      resources = NEW Progress.Util.ResourceManager("Guru.Window").

     ...

      appearance16:Image = CAST(resources:GetObject("appearance16.Image"), System.Object).

     ...

     THIS-OBJECT:ToolbarManager:Ribbon:ApplicationMenuButtonImage = CAST(resources:GetObject("ToolbarManager.Ribbon.ApplicationMenuButtonImage"), System.Drawing.Image).

It feels like Progress.Util should always be deployed with any software created with OEA, especially since the Visual Designer uses its types. Therefore I am pretty sure this is a bug.

Either way I really would appreciate some help! Thanks in advance!

All Replies

Posted by Shelley Chase on 21-May-2012 09:20

Hi Fredrick,

Please log a bug with tech support. We did do testing with the GUI for .NET and WebClient but maybe we missed something.

In the meantime a workaround would be to package the dll with your app for download.

Thanks

-Shelley

Posted by Haikarainen on 22-May-2012 08:29

Hi again!

Packaging the DLL did not work, however we have been researching the issue and solved the current problem. For future reference we mixed versions(development machines was running 10.2b, while deployed machines ran 10.2a, the specific type in NetUI probably changed name from ver a to ver b).

We are currently working on fixing configurations and code to work flawlessly on deployed machines on different OS'es, it seems slightly problematic and I will reply in this thread if I come to the conclusion that any potential problem relies on Progress Software.

Thank you for your fast response and service!

Posted by Shelley Chase on 22-May-2012 11:32

The name does change. One thing you can do is to use the prowin32.config.exe file to translate those references at runtime although normally this is done to use a newer version not an older version. Take a look at http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx

-Shelley

This thread is closed