Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET application won't open in windows 7

Tags:

c#

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?

like image 875
icon5585 Avatar asked Mar 01 '11 19:03

icon5585


People also ask

How do I open .NET framework in Windows 7?

Select Start > Control Panel > Programs > Programs and Features. Select Turn Windows features on or off. If not already installed, select Microsoft . NET Framework and click OK.

Is .NET framework compatible with Windows 7?

Supported client operating systemsNET Framework requires Windows 7 SP1. If you're on Windows 7 and haven't yet installed Service Pack 1, you need to do so before installing the . NET Framework.

Which .NET is best for Windows 7?

Generally you should stick with the newest . NET Framework that is supported by all OS's that you want to support, which currently would be . NET 4.7. 2 this version is distributed to all Windows user by the windows update.


1 Answers

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.

like image 164
Mike Atlas Avatar answered Oct 04 '22 05:10

Mike Atlas