System.FileLoad Exception

Topics: Questions
Oct 14, 2014 at 9:38 AM

Because of the Issue "Viewmodel are closed at startup and build again", and I don't know how to resolve I search for a temporary workaround.

As I wrote in the issue:
I commented this lines out in DataContextChangedHelper OnInheritedDataContextChanged

var handler = d.GetValue(DataContextChangedHandlerProperty) as DependencyPropertyChangedEventHandler;
if (handler != null)
    handler(d, e);
I compiled the mvvm.dll for my self. It works on my pc. But If I install my application on a other pc I get an System.FileLoad Exception in catel. MVVM and my application crash.

Do I have to register the dll in any way? Or do you have any idea why I get this exception?
Oct 15, 2014 at 8:07 AM
Is this because of the version information:

[assembly: AssemblyInformationalVersion("4.0, manually built in Visual Studio")]

Instead of 4.0.507-unstable?
Oct 15, 2014 at 8:32 AM
Oh. No that's not the problem. I get the same exception with the original catel.mvvm.dll !?
Oct 15, 2014 at 8:36 AM
Do you have details of the FileLoadException?
Oct 15, 2014 at 8:47 AM
Edited Oct 15, 2014 at 8:47 AM
Not very much.

That's the informations I get in a Window at the start of my application.

Problemereignisname: CLR20r3
Problemsignatur 01: configurator.exe
Problemsignatur 02:
Problemsignatur 03: 543e2209
Problemsignatur 04: Catel.MVVM
Problemsignatur 05:
Problemsignatur 06: 542e6441
Problemsignatur 07: 31e
Problemsignatur 08: 144
Problemsignatur 09: System.IO.FileLoadException
Betriebsystemversion: 6.1.7601.
Gebietsschema-ID: 1031
Zusatzinformation 1: 0a9e
Zusatzinformation 2: 0a9e372d3b4ad19135b953a78882e789
Zusatzinformation 3: 0a9e
Zusatzinformation 4: 0a9e372d3b4ad19135b953a78882e789
Oct 15, 2014 at 8:49 AM
Edited Oct 15, 2014 at 8:50 AM
Make sure that your app.config doesn't contain assembly redirects. Also, make sure your file version is (that is the upcoming Catel version).
Oct 15, 2014 at 9:04 AM
My app config contains
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
without I can not compile.

I replaced my own compiled version again with the original. So no manually compiled versions of catel are in my project. So the file version should be ok.
Oct 15, 2014 at 12:38 PM
I installed on a old system with installed vs 2010. There I get the more information about the exception. System.Threading.Tasks was missing in version 1.5.11
then I see I forget to copy the .exe.config file. So the bindingRedirect can not work.

Now it works on my old system. But not on my productive system. There I get the still the same exception ?!
Oct 15, 2014 at 12:46 PM
Is it a NET 4.0 or NET 4.5 app? If NET 45, are you using NET 40 assemblies?
Oct 15, 2014 at 1:05 PM
It is a .Net 4.0 Application.
Oct 15, 2014 at 2:05 PM
I debugged wit debbugerconsole on the productive system. It seems the problem is System.core.dll

I get the exception: Could not find or load assembly System.Core.dll ??
Oct 16, 2014 at 7:05 AM
System.Core.dll is the Portable Libraries version.

Do Catel.MVVM in Version 4.0 use this Version?
Oct 16, 2014 at 7:07 AM
Oct 16, 2014 at 1:14 PM
1) Are you using an old version of Catel.Fody (that had a bug that could include that version)?
2) Are you using the latest BCL versions?
3) Are you still using Windows XP?
Oct 17, 2014 at 12:23 PM
1) I do not use Catel.Fody
2) Latest BCL is installed (Catel installed it automatically)
3) No but, on our productivity system the windows updates are not installed. If I install the hotfix it works.