Each .NET WinForms application crashes when launched outside of Visual studio

This can be a very stupid problem, so I apologize in advance.

The problem is this:

I try to build every application with window forms (even a very simple application) in visual studio 2010, even if it works fine when starting from the IDE mode - debugging, no errors, no unhandled exceptions, no crashes, nothing. No warnings from the compiler (I have warning level 4 set). Whenever I try to run it without debugging mode or outside the IDE, it runs for about 1 minute and then closes, regardless of whether I interact with the application or not. No error message is displayed, nothing. He just disappears. I tried to find the Windows event log, no result. Maybe I need to change the event log settings?

What distinguishes this problem from other similar problems described in stackoverflow is that it happens with every application compiled under the visual studio, a "crash" occurs every time the application starts, and occurs in a very short time.

Here is the bulk of the source code for one such example of a one-time dummy application that I wrote:

    namespace pj2_lastAttemptApp
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            private void button1_Click(object sender, EventArgs e)
            {
                label1.Text = "You have written: " + textBox1.Text;
            }
        }
    }

And yet even this is a failure, if only in debug mode. I am using Visual Studio 2010 Professional, my OS is Windows Vista Business. Any help would be appreciated.

Edit: this is the attached debugger output:

  'pj2_lastAttemptApp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
  'pj2_lastAttemptApp.exe' (Managed (v4.0.30319)): Loaded 'D:\User_data\<my user name>\Documents\Visual Studio 2010\Projects\pj2_lastAttemptApp\pj2_lastAttemptApp\bin\Release\pj2_lastAttemptApp.exe', Symbols loaded.
  'pj2_lastAttemptApp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
  'pj2_lastAttemptApp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
  'pj2_lastAttemptApp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
  The program '[1852] pj2_lastAttemptApp.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
  The program '[3436] pj2_lastAttemptApp.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0). 
+3
source share
1 answer

exe, "Local copy" = true node . , .

0

All Articles