title: Invalid Deployment Exception
body: <p>When creating new class instance I get "A first chance exception of type 'System.Deployment.Application.InvalidDeploymentException' occurred in System.Deployment.dll".</p>
  
  <p>It happens at:</p>
  
  <pre><code>PrinterSettings^ MyPS = gcnew PrinterSettings();
  </code></pre>
  
  <p>Everything works fine and I get a value I want.</p>
  
  <p>Form1.cpp:</p>
  
  <pre><code>#include "stdafx.h"
  #include "Form1.h"
  #include "Print.h"
  #include &lt;iostream&gt;
  
  System::Void DPrint::Form1::Form1_Load(System::Object^  sender, System::EventArgs^  e)
  {
      PrinterSettings^ MyPS = gcnew PrinterSettings();
      System::Windows::Forms::MessageBox::Show("From Class PrinterSettings: " + MyPS-&gt;IniFilePath());
  }
  </code></pre>
  
  <p>Print.h:</p>
  
  <pre><code>#ifndef PRINT_H
  #define PRINT_H
  
  public ref class PrinterSettings
  {
  private:
      System::String^ m_strPath;
  
  
  public:
      PrinterSettings()
      {
          m_strPath = System::Windows::Forms::Application::UserAppDataPath;
      }
  
      System::String^ IniFilePath() { return m_strPath; };
  
  };
  #endif
  </code></pre>
  
  <p>Any ideas what is going on? Thank you.</p>