Upgrade Telerik Controls - System.Reflection.TargetException

Posted by gdb390 on 01-Dec-2015 04:34

Hello,

OpenEdge 11.6 

I created a openedge project (GUI for .Net) in PDSOE and I made some forms (OERadform) with Telerik controls on it.

Because I was tired of the Registration screen of Telerik (11.6 comes with Tral License of Telerik Winforms) , I updated the assembly references to Telerik version 2015.3.1104.40.

Since I did that, I'm not able to run my form anymore and it gives an error :  System.Reflection.TargetException : the object does not match the target type

Is this related to Telerik ? Is it another issue because I updated the assemblies ?

Posted by Phani Sajja on 01-Dec-2015 05:44

Hi,

I think the binding redirection in prowin32.exe.config file is missing

 <dependentAssembly>

     <assemblyIdentity

       name="Telerik.WinControls.UI"

       publicKeyToken="5bb2a467cbec794e"

       culture="neutral" />

     <bindingRedirect oldVersion="2015.2.728.40" newVersion="2015.3.930.40" />

   </dependentAssembly>

Add the above xml inside 'assemblyBinding' element.

--

Regards

Phani S

All Replies

Posted by Mike Fechner on 01-Dec-2015 04:37

Did you recompile?

Posted by gdb390 on 01-Dec-2015 04:46

Yes, I did

Posted by Mike Fechner on 01-Dec-2015 04:49

Anything helpful in the Exception stack trace?

Posted by Matt Gilarde on 01-Dec-2015 04:58

Progress.Telerik.dll is built against the version of Telerik WinForms which is included in 11.6. If you want to use a different version of WinForms you have to include it in prowin32.exe.config (prowin.exe.config for 64-bit)  to tell the .NET assembly loader about it. There is information about this somewhere in the documentation. I have pinged someone who can provide more detail about what you need to do.

Posted by Keerthy Yeddula on 01-Dec-2015 05:13

Hi,

I have dropped PDSOE shipped telerik controls on OERadForm and updated telerik assemblies to other than PDSOE shipped version (2015.3.930.40 ) from Update Assembly References dialog. I'm able to run form successfully without any errors. Did you try updating assemblies from Update Assembly References dialog?

Thanks,

Keerthy.

Posted by gdb390 on 01-Dec-2015 05:34

Yes, I did the update from Update Assembly References dialog !

Posted by Phani Sajja on 01-Dec-2015 05:44

Hi,

I think the binding redirection in prowin32.exe.config file is missing

 <dependentAssembly>

     <assemblyIdentity

       name="Telerik.WinControls.UI"

       publicKeyToken="5bb2a467cbec794e"

       culture="neutral" />

     <bindingRedirect oldVersion="2015.2.728.40" newVersion="2015.3.930.40" />

   </dependentAssembly>

Add the above xml inside 'assemblyBinding' element.

--

Regards

Phani S

Posted by gdb390 on 01-Dec-2015 06:10

Hi,

I added the missing part in the config file and did a recompile and now it's working again

What did I do wrong to get this behavior ?

Posted by gdb390 on 01-Dec-2015 06:29

And what if you have different projects with different Telerik versions ?   Will that work with the addition in the config file ?

Posted by Phani Sajja on 01-Dec-2015 06:36

The form 'OERadForm' is part of 'Progress.Telerik.dll' is built against the version '2015.2.728.40'. But you are using a different version than the one built against. So this binding redirection is required.

With this, all the projects refers same version.

Regarding different projects with different Telerik versions, is not available as far as I know.

--

Regards

Phani S.

Posted by gdb390 on 01-Dec-2015 06:48

Is there not a way that when Telerik (a Progress Company)  brings out a new version, Progress makes the Progress.Telerik.dll available for that version ?   Or isn't it as simple as that ?

Posted by Garry Hall on 01-Dec-2015 07:55

Being Matt's "pingee", I'll chime in.

During the development of the subclassed RadForm controls, we did identify that there would be a problem if customers wanted to use different Telerik versions in different projects. We have a theoretical solution to this, but have yet to implement it. The result would (hopefully) be that each project would need to run its own AVM, as once an assembly is loaded into the CLR, this is the assembly that will be used for the life of the session (a .NET limitation, not an AVM limitation). There would also possibly be no need to provide a redirection in the app config file, but that is only on paper at the moment.

This work is currently scheduled for a TBD future release. It was not implemented in 11.6 for a couple of reasons:

1) There had been no feedback from the ESAP that anyone was suffering from this;

2) It was identified relatively late in the 11.6 release cycle, and given there was no feedback identifying a need, the dev time was instead spent on other things.

If you see this as a pressing need, Product Management needs to hear this, in order to prioritise this work higher. Please use the appropriate mechanism in order to let them know.

However, until this is addressed, we would appreciate you "kicking the tires" of the OERadForms, to iron out any issues with them. This would make the future implementation of a per-AVM OERadForm a little easier to maintain.

Posted by Garry Hall on 01-Dec-2015 08:19

As for "making a new Progress.Telerik.dll available" when Telerik brings out a new version, we did consider that, but that is a maintenance and supportability nightmare. Progress have to build Progress.Telerik.dll for all supported OpenEdge versions (at the moment, just 11.6, but then there would be 11.6.1, 11.7 etc...) for all supported Telerik versions... the matrix gets big fast, as Telerik releases versions much more frequently than OpenEdge, and OpenEdge versions stay supported a long time. Then application vendors have to provide the correct Progress.Telerik.dll required by the application. If you don't the customer will get the Exceptions instead, resulting in support calls. It is also a problem for WebClient: the application vendor would have to know which version of WebClient the end-user is running, and ship the appropriate Progress.Telerik.dll with it... although under some circumstances you might be forcing the user to the latest WebClient version, in which case you would have to deploy multiple Progress.Telerik.dll assemblies with the application, and provide logic to install the correct one.

We opted to use the redirection in the app config file to address this instead.

The theoretical solution I mentioned above would also avoid these problems.

Posted by gdb390 on 02-Dec-2015 03:04

Hi Garry,

Thanks for the above responses !

We are migrating our applications to Telerik and we recently bought licenses for our developers .

The version that was available to download from the Telerik Control Panel was already higher than the trial version shipped with 11.6, so I think everyone who will be using Telerik will come across this issue .

We did participate in the 11.6 Beta program, but we only used the trial version that was installed along the progress installation.

We are testing with OERadRibbonForm and OERadForm, so if we come across issues we will definitely report them !

Posted by Garry Hall on 02-Dec-2015 09:44

Yes, anyone who installs the latest full Telerik Winforms version, instead of using the packaged trial version, will have to make changes to the AVM's app config file. I had thought that the information Phani provided was in the doc, but apparently it is not. I have asked Tech Support to write a KBase entry with this information, because (as you say) others will see this.

Are you impacted at the moment by the lack of support for different Telerik versions in different projects? Or is that just just a concern for the future?

This thread is closed