c# - .NET 应用程序无法在 Windows 7 中打开

标签 c# windows-7

我在 Windows XP 上使用 Visual Studio 2010 创建了一个非常简单的 C# 应用程序。它在我的机器上编译、运行和调试都很好。我什至为发布而构建它,并在我的机器和另一台 Windows XP 机器上完美运行 .exe。当我发送带有 .exe 文件的发布文件夹并且他们打开它时,没有任何反应!没有错误或任何东西,只是空白!

已安装 .NET 版本 4 框架

它是一个 Windows 窗体应用程序。

更新:OP 对以下答案之一的评论中的详细信息:

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?

最佳答案

首先,您可以尝试检查 Event Viewer对于任何相关的错误消息(如上所述)。

接下来,确保他们安装了 .NET(如上所述)。

然后,尝试添加 UnhandledExceptionEventHandler在您的应用程序和该处理程序中,尝试至少编写一个简单的日志/文本文件,其中包含导致您的应用程序退出的异常。

关于c# - .NET 应用程序无法在 Windows 7 中打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5159053/

相关文章:

c++ - 如何在程序执行期间防止屏幕保护程序和 sleep ?

c# - 如何使用 C# 和 .NET 框架创建 Windows 7 通知区域弹出窗口?

c# - 如何在 .net HttpWebRequest 中自动检测/使用 IE 代理设置

c# - BLToolkit-mysql-connector异常: Could not load file or assembly MySql.数据,版本=6.9.7.0

Exchange 2010 上的 C# 和 powershell - 无法识别术语 'Group-Object'

c++ - GlobalAddAtom() 在 Win7 上返回 0 和 GetLastError = 0x5,在 XP 上有效

java - Android Studio 135.1641136 : does not launch app

python - 无法安装biopython包

c# - .NET控件(如Ms Paint)具有文本效果

c# - 验证另一个字符串之间的字符串?