12
votes

I created a pretty simple c# application using visual studio 2010 on windows xp. It compiles, runs and debugs fine on my machine. I even built it for release and ran the .exe on my machine and another windows xp machine perfectly fine. When I send the release folder with the .exe file and they open it, nothing happens! No errors or anything, just blank!

.NET version 4 framework installed

It is a windows form application.

UPDATE: Details from OP's comments given to one of the answers below:

Hey everyone, thanks for the ideas. I copied what I found on my friends windows 7 machine event log and this is what it said:

Application: ePrescribing.exe Framework Version: v4.0.30319
Description: The process was
terminated due to an unhandled
exception. Exception Info:
System.IO.FileNotFoundException Stack:
at
ePrescribing.frmApp.InitializeComponent()
at ePrescribing.frmApp..ctor() at
ePrescribing.Program.Main()

   Faulting application name: ePrescribing.exe, version: 1.0.0.0,  

time stamp: 0x4d61e693 Faulting module
name: KERNELBASE.dll, version:
6.1.7600.16385, time stamp: 0x4a5bdbdf Exception code: 0xe0434352 Fault
offset: 0x0000b727 Faulting process
id: 0xb38 Faulting application start
time: 0x01cbe1dbe6d4ba2d Faulting
application path:
C:\Users\Duane\Downloads\ePrescribing.exe
Faulting module path:
C:\Windows\syswow64\KERNELBASE.dll
Report Id:
266adc61-4dcf-11e0-8438-e0cb4e197cde –

   Fault bucket , type 0 Event Name: CLR20r3 Response: Not available  

Cab Id: 0 Problem signature: P1:
eprescribing.exe P2: 1.0.0.0 P3:
4d61e693 P4: ePrescribing P5: 1.0.0.0
P6: 4d61e693 P7: 28 P8: e P9:
System.IO.FileNotFoundException P10: –

I removed the only area where I
thought there would be a file load
(for the picturebox loading profile.jpg) and still got the same error. Any ideas?

8
What .NET Framework do you have installed on the Windows 7 machine? There is no reason your application shouldn't work.Security Hound
Look in your event log for crash reports from your app.Michael Petrotta
WinForms or Console application? What is it doing?Shadow Wizard Is Vaccinated V3
do you check event log or add simple logging to your application?acoolaum
@icon5585 which solution worked for you? I'm getting the exact some errors from the eventlog that you are getting below. My suspicion is that the .NET SDK is not installed, or that the GAC does not contain the same dlls on both servers.Jason D.

8 Answers

4
votes

First, you might try checking the Event Viewer for any relevant errors messages (as stated above).

Next, make sure they have .NET installed (as stated above).

Then, try adding an UnhandledExceptionEventHandler to your application and in that handler, try to at least write a simple log/text file containing the exception that caused your application to exit.

2
votes

Make sure the latest .NET framework is installed.

2
votes
  1. Check .NET framework installed on win7 computer equal your application framework target.
  2. Check in the process explorer that it's running but didn't show you anything.
  3. Check event log for crash reports.
  4. Try to add logging to your application in different places and add unhandled error handlers.
2
votes

Additionly to other answers I would also check whether your app compiled against x86/x64 runtime

2
votes

Have you included a manifest file?

Take a look at this.

Or this...

1
votes

Are you accessing any folders via static paths instead of environment variables? That could cause issues between these versions of Windows.

0
votes

You should check if all other third party assemblies can be found either in GAC or app folder

0
votes

Referenced assembly may be missing from target computer. Please set Copy Local=True for all referenced library. This may solve your issue.