icon5585
icon5585

Reputation: 121

.NET application won't open in windows 7

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?

Upvotes: 12

Views: 21475

Answers (8)

rishad2m8
rishad2m8

Reputation: 1508

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

Upvotes: 0

Adi
Adi

Reputation: 5223

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

Upvotes: 0

JimDel
JimDel

Reputation: 4359

Have you included a manifest file?

Take a look at this.

Or this...

Upvotes: 2

Snowbear
Snowbear

Reputation: 17274

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

Upvotes: 2

Babak Naffas
Babak Naffas

Reputation: 12561

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

Upvotes: 1

acoolaum
acoolaum

Reputation: 2130

  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.

Upvotes: 2

Mike Atlas
Mike Atlas

Reputation: 8231

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.

Upvotes: 4

Mathieu
Mathieu

Reputation: 4520

Make sure the latest .NET framework is installed.

Upvotes: 2

Related Questions