3

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?

Villeee
  • 33
  • 3
  • 1
    which framework version is installed on the customers computer? The [constructor](http://msdn.microsoft.com/en-us/library/ms522861.aspx) is supported in .NET 4.5, 4, 3.5, 3.0 and .NET Framework Client Profile 4, 3.5 SP1. – Jehof Jul 04 '13 at 11:50
  • There is .NET Framework 4 Client Profile and .NET Framework 4 Extended installed so it should be fine. – Villeee Jul 04 '13 at 12:41

1 Answers1

1

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.

Chrisi
  • 371
  • 3
  • 15