title: Making Silverlight 2 programs work in Silverlight 4
body: <p>I am trying to make Jeff's testing program, written in Silverlight 2 (http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/), work using Silverlight 4 and VS2010 and I get a NullReferenceException at this line:
      chatSession.ConnectWithRemoteUser("ScottGu");
  Any ideas why? Here's code:</p>
  
  <pre><code>public Page()
  {
      // commented out because it doesn't exist in the current context 
      // according to the compiler
      // InitializeComponent();
  
      // Retrieve ChatSession instance from XAML resource declaration
      chatSession = new ChatSession();
      chatSession = (ChatSession)Resources["ChatSessionDS"];
  
      // Connect with Chat Server to chat with "ScottGu"
      chatSession.ConnectWithRemoteUser("ScottGu");
  }
  </code></pre>