Re: C# Forms will not start from Debug Menu



Hi Oleg, I'd actually tried disabling that before and it didn't work. Also,
I'm not sure why running the form would return an access violation error.

I did some searching for that exit code and found out that it could have
something to do with the length of the name of the solution. So in the
example below, the solution name and project name are both
"WindowsApplication1" so I'm guessing it's too long.

So I created a new form with a shorter solution name and I was actually able
to run it. However, I tried renaming the "WindowsApplication1"
solution/project/assembly_name to a shorter name and then did a clean/build
but it still wouldn't run. Maybe I'm forgetting to change something else?

At least i got the app to run.

"Oleg Starodumov" wrote:


This error code means "access violation".
Will anything change if you disable VS hosting process?

Project properties | Debug | "Enable the Visual Studio Hosting Process" (uncheck it)

Oleg

Hi Oleg,

This occurs with any wizard generated C# winform. So basically when i start
the application from within visual studio via the debug(f5) button, the form
application immediately exits and returns a weird code (-1073741819) after
the form is loaded. Note that if I also try to start the release version
from within visual studio, the same thing will happen.

Here's a sample output from the debug window:

[code]

The thread '<No Name>' (0x1538) has exited with code 0 (0x0).
'SampleForm.vshost.exe' (Managed): Loaded 'C:\Documents and
Settings\Miguel\My Documents\Visual Studio
2005\Projects\WindowsApplication1\WindowsApplication1\bin\Debug\SampleForm.exe', Symbols loaded.
The program '[684] SampleForm.vshost.exe: Managed' has exited with code
-1073741819 (0xc0000005).
[/code]

I have another machine and if copy the project over to it and run it from
within visual studio, it runs fine.

Thanks Oleg.

"Oleg Starodumov" wrote:


I'm using Visual Studio .net '05 SP1 and I can't even get a simple c# form
to start from the debug menu. I'm able to build it and I can actually run it
manually from the local directory but I just can't get it to run from within
visual studio. I even tried a c++ windows form and it worked fine. So I'm not
really sure what's going on.

I did finda a hotfix that describes my problem but the fix pertains to
visual studio .net '02:

http://support.microsoft.com/default.aspx/kb/326098/


What exactly happens when you try to debug the project?
Does it happen with only one project, or with any C# WinForms project?
Does it happen with wizard-generated projects without any additional changes?

--
Oleg
[VC++ MVP http://www.debuginfo.com/]






.


Loading