Bug 8922 - An exception was thrown by the type initializer for System.Web.Script.Serialization.JavaScriptSerializer ---> System.InvalidCastException: Cannot cast from source type to destination type. (When mixing net 4 with assemblies referencing previous versions)
Summary: An exception was thrown by the type initializer for System.Web.Script.Seriali...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-13 15:20 UTC by Pablo Ruiz García
Modified: 2012-12-13 15:21 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Pablo Ruiz García 2012-12-13 15:20:20 UTC
Hi,

This bug is not new, as it existed already on novell's bugzilla for a while: https://bugzilla.novell.com/show_bug.cgi?id=664813

However, it remains open, and even if Marek's proposed workaround works fine (thnks Marek), this problem simply does not exists on MS.NET side, so I feel there's a need for a runtime-wide fix not involving an assembly redirect on the app's .config file.

Robert Jordan proposed adding an entry to remapped-assemblies list, and Marek rejected the idea as it would break existing software like Telerik's suite.

I could spare some time trying to fix this at a system-wide/runtime level, Marek, do you have any proposal or alternative I could look into?

Greets.

Note You need to log in before you can comment on or make changes to this bug.