Frage

Our program fails to open window which uses command bindings. Program works fine on dozens of computers but with one customers computers it throws MissingMethodException. Computers are with Windows 7 and .NET Framework installed.

So I made a simple testprogram where I only create command bindings.

CommandBindings = new List<CommandBinding>();
CommandBindings.Add(new CommandBinding(ApplicationCommands.SaveAs, SaveAs));
...

And it fails when creating bindings.

System.MissingMethodException: Method not found: Void System.Windows.Input.CommandBinding..ctor(System.Windows.Input.ICommand, System.Windows.Input.ExecutedRoutedEventHandler).

This same testprogram works fine on all other computers.

Any ideas?

War es hilfreich?

Lösung

Ran into the same problem. Turned out that in my project the .Net Framework 4.5 was selected, but my client only had .Net 4.0.3019 installed. Changed the target framework in all my projects to .Net Framework 4 and it runs without any problems.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top