문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top