title: PropertyChanged is not fired from a class in a different assembly
body: <p>I have a class library with a base class (<code>BaseViewModel</code>) that implements <code>INotifyPropertyChanged</code>, and a class that derive from it (<code>TestExternal</code>).</p>
  
  <p>I use Fody v4.2.1 and PropertyChanged.Fody v2.6.1.</p>
  
  <p>In the WPF app, I use that class as DataContext. When a property is changed, it is not reflected in the app. However, if I copy (and rename to <code>TestInternal</code>) that class from the class library to the app, property changes are reflected in the app. The class <code>TestInternal</code> is derived from the very same <code>BaseViewModel</code> in the class library.</p>
  
  <p>The class in this simplified example consists of a <code>string</code>and <code>ObservableCollection&lt;string&gt;</code>.</p>
  
  <p>The <code>ObservableCollection&lt;string&gt;</code> is bound to a control, and adding the element <code>"d"</code> is reflected correctly in the app in both cases. But setting the string property to <code>"C"</code> is only reflected in the <code>TestInternal</code> class.</p>
  
  <p>What do I need to do to get this working?</p>
  
  <h2>BaseViewModel.cs</h2>
  
  <pre><code>// This class is in the class library
  public class BaseViewModel : INotifyPropertyChanged
  {
      public event PropertyChangedEventHandler PropertyChanged = (sender, e) =&gt; { };
  
      public void OnPropertyChanged(string name)
      {
          PropertyChanged(this, new PropertyChangedEventArgs(name));
      }
  }
  </code></pre>
  
  <h2>TestExternal.cs</h2>
  
  <pre><code>// This class is in the class library
  public class TestExternal : BaseViewModel
  {
      public ObservableCollection&lt;string&gt; UserProjects { get; set; }
      public string TestProp { get; set; }
      System.Windows.Application App;
  
      public TestExternal(System.Windows.Application app)
      {
          this.App = app;
          UserProjects = new ObservableCollection&lt;string&gt;(new List&lt;string&gt;() { "a", "b", "c" });
          TestProp = "A";
  
          Task.Factory.StartNew(() =&gt;
          {
              Thread.Sleep(5000);
              App.Dispatcher.Invoke((Action)delegate
              {
                  TestProp = "C";
                  UserProjects.Add("d");
              });
          });
      }
  }
  </code></pre>
  
  <h2>TestInternal.cs</h2>
  
  <pre><code>// This class is in the WPF app project
  public class TestInternal : BaseViewModel
  {
      public ObservableCollection&lt;string&gt; UserProjects { get; set; }
  
      public string TestProp { get; set; }
  
      System.Windows.Application App;
  
      public TestInternal(System.Windows.Application app)
      {
          this.App = app;
          UserProjects = new ObservableCollection&lt;string&gt;(new List&lt;string&gt;() { "a", "b", "c" });
          TestProp = "A";
  
          Task.Factory.StartNew(() =&gt;
          {
              Thread.Sleep(5000);
              App.Dispatcher.Invoke((Action)delegate
              {
                  TestProp = "C";
                  UserProjects.Add("d");
              });
          });
      }
  }
  </code></pre>
  
  <h2>XAML</h2>
  
  <pre><code>&lt;TextBlock Text="{Binding TestProp}" Style="{StaticResource NaviHeading}" /&gt;
  </code></pre>