title: WPF Program Startup Crash: How to Debug?
body: <p>I have a WPF program that runs fine on the development PC and on the client PC 1.  But on client PC 2, it crashes immediately on startup with the Send Report to Microsoft window.  I would appreciate some advice on how to trace what is wrong.  Here's what I have tried:</p>
  
  <ol>
  <li><p>Inserted try-catch in my main window class:</p>
  
  <pre><code>public MainWindow()
  {
    try
    {
       MessageBox.Show("Before InitComp()");
       InitializeComponent();
       MessageBox.Show("Before Sub1()");
       Subroutine1();
       MessageBox.Show("Before Sub2()");
       Subroutine2();
       ... etc ...
    }
    catch (Exception ex)
    {  ... code for MessageBox display error here ... }
  }
  </code></pre></li>
  </ol>
  
  <p>The idea is to try to isolate which part of the startup sequence is crashing, but the first debug message "Before InitComp()" does not even show up.  So it seems the app is crashing even before starting my code.</p>
  
  <ol>
  <li>One possibility is to install the entire VS2008 in the client PC 2, load in the source and use the IDE Debugger to trace the problem.  This is likely the most effective in finding the problem.  But I do not want to do this because a) the client PC 2 does not belong to me, b) it does not scale: I must do likewise for client PC 3/4/5/... and c) it violates my firm's VS2008 license.</li>
  </ol>
  
  <p>How should I go about debugging this problem?</p>