title: Using RelayCommand in MVVM Light with a CanExecute delegate causes my application not to launch
body: <p>I'm having trouble getting the RelayCommand from MVVM Light to work in a WPF application, specifically when I try to use a CanExecute delegate. If I add this second parameter to the constructor of the command, the MainWindow never launches and I have to kill the application from Task Manager. This problem goes away if I remove the second parameter. I've searched around and found out that MVVM Light switched to a portable class library which caused some issues with the CanExecute delegate. I've tried going back to version 4.2.32.7 of MVVM Light, and also tried using the Galasoft.MvvmLight.CommandWpf namespace, but neither of these helped. </p>
  
  <p>I should also mention that no build errors (it says the build succeeds) or compilation errors occur. Here is some simple code where I found the problem:</p>
  
  <pre><code>public class MainViewModel : ViewModelBase
  {
      public MainViewModel()
      {
      }
  
      private string myString;
      public string MyString
      {
          get { return myString; }
          set { Set("MyString", ref myString, value); }
      }
  
      private string myOtherString;
      public string MyOtherString
      {
          get { return myOtherString; }
          set { Set("MyOtherString", ref myOtherString, value); }
      }
  
      private RelayCommand myCommand;
      public RelayCommand MyCommand
      {
          get
          {
              return myCommand ??
                  (myCommand = new RelayCommand(
                      () =&gt; MyOtherString = MyString,
                      () =&gt; MyString.Length &gt; 5));
          }
      }
  }
  </code></pre>
  
  <p>My view is just two text boxes: one bound to MyString and one bound to MyOtherString. There is also a button bound to MyCommand. Does anyone know why using the CanExecute parameter breaks my application?</p>