Could not load file or assembly GalaSoft.MvvmLight

1

"Could not load file or assembly 'GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=0ffbc31322e9d308' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=0ffbc31322e9d308"

I get the above error when trying to instantiate a class which uses the MvvmLightLibs library from a .NET Framework 4.6.1 WPF Application.

Adding a binding redirect does not resolve the issue, and the version of the .dll in the bin folder is 5.4.1.0, which is the same as the missing assembly in the error message.

<dependentAssembly>
        <assemblyIdentity name="GalaSoft.MvvmLight" publicKeyToken="0ffbc31322e9d308" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-5.4.1.0" newVersion="5.4.1.0"/>
</dependentAssembly>
c#
wpf
mvvm
mvvm-light
asked on Stack Overflow Aug 30, 2018 by Doove

1 Answer

0

or one of its dependencies

Most likely you are not missing GalaSoft.MvvmLight, Version=5.4.1.0, but rather you missing one of its dependencies. Take a look on its dependency list. Also, it is common that GalaSoft.MvvmLight depend on a different version of a library, than version you are using in your project.

answered on Stack Overflow Aug 30, 2018 by Igor Yalovoy

User contributions licensed under CC BY-SA 3.0