Mvvm light for .Net 4.0 and single EXE

May 8, 2014 at 9:03 PM
Hello,

When I try to make my WPF application a single executable with mvvm light v4.3.31.1 for .Net 4.0 using this method I end up with an exception "Entry point was not found" when the executable is alone. It works only when the .config file and the Microsoft.Practices.ServiceLocation.dll is in the same folder as the executable, other dll are not required.

The exact same project works fine as a standalone when using .Net 4.5 and the last mvvm light version, but as I need to downgrade the framework version to 4.0 (for windows XP) I can't get it to work any more.

Is there a way to make the project use the common service locator in a "normal" way, without the config file ?
May 12, 2014 at 9:21 PM
I fixed the problem by removing mvvm light installed from nuget, replacing it by the library only and creating the locator myself (with the same method as the first package). This wayt my executable don't need the assembly binding anymore.