Hi everyone,
I made a small program with C# express for someone (just a simple form)
and when I run it through Visual Studio, it works perfectly. Now
when I take the .exe file from the bin directory and copy it on the
desktop, it works great for a while, but after a certain time (or if I
reboot), I get an error when I start the executable file:
"C:\Documents and Settings [...] Projects\Quiz\bin\Release\Quiz.exe is not a valid Win32 application".
ONCE I GET THIS MESSAGE, when I restart Visual Studio and try to run the same program in debug mode, I get the message :
"Error while trying to run project : Could not load file or assembly
'Quiz' or one of it's dependencies. The module was expected to
contain an assembly manifest".
The only way to make it run again is to Rebuild the whole project.
I thought that the exe file was suppose to contain everything it needed to run as a standalone file.
How come the exe file works fine for a while and then, just stops working when I reboot... any ideas

Not a valid Win32 Application Error
Lexa83
The odd thing is that I have many C# projects and this one is the only one that gives me this kind of error.
marmarou
No, exe is not a standalone file, well in .Net I suppose. Coz exe's in .net are dependent on the .net framework. And other exe's require 3rd party dll's to be installed for your exe to run.
In your problem, try copying you release folder to other computers with a .net framework present. See if the behavior still occurs. This really is weird and maybe the problem lies in your computer. See if it also occurs to other computers...
cheers,
Paul June A. Domag
gearmesh
AntonyClark99
Hi,
My best guess is that your exe file needs a dll or some file from your release folder. Try copying all of the folders content and see if the problem still occurs,.
cheers,
Paul June A. Domag
Rohit Saxena
please help me email me at
sadnlazy@hotmail.com
thank you
Buruburu
upsun
Hello,
I am getting this error when I try to view a JPEG file in my outlook or gmail account. I have kodak easyshare software.
I have windows XP on my sony Vaio laptop, can someone advise what I need to do as I am not tech savy.ou
Thank you,
Cindy Keil
Dean.C
I tried it and the problem still occurs on other computers. But I noticed something else with my exe file. After I compile my solution, the size of my exe is 144 Kb. If I reboot (or if I leave it alone for a while like an hour), the size goes up to 180 Kb. Then it gives me the error. The size goes from 144 kb to 180 without me touching it at ALL.... very odd.
The problem can't be related to file dependencies because the problem occurs even if I let the exe in the Release folder with all the other dlls and manifest stuff with it... This thing drives me nuts.
Phil
Hasan
Hi,
Thanks for the reply.
I tried that before but it still doesn't work. My program is only one simple form and I don't use any dll. The strange thing is that it works fine for about an hour or so. If I reboot or if I don't use it for a while, then I get the error message...
Isn't the exe suppose th have everything it needs to work as a standalone file