.Net windows .exe 应用程序安装后出现错误

发布于 2024-12-10 20:36:43 字数 254 浏览 0 评论 0原文

我已经使用安装工厂准备了一个可执行文件。安装部分工作完美,但是当我在桌面或安装目录中打开我的 exe 文件时,我看到一个错误,这是

http://www.freeimagehosting.net/newuploads/06cfc.png

任何帮助将不胜感激...提前致谢..

I have prepared an executable file using setup factory.The installation part works perfect but when i open my exe file on desktop or in the installed directory i see an error which is this

http://www.freeimagehosting.net/newuploads/06cfc.png

Any help would be highly appreciated...Thanks in advance..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

心凉怎暖 2024-12-17 20:36:43

从这张图片中你无法判断发生了什么。那是一次一般性的崩溃。检查事件日志。您可以尝试打开融合日志记录以查看是否缺少可能导致崩溃的程序集。文件监视器也可以帮助您查看正在加载的内容,但我会首先尝试 Fusion。

启用程序集绑定失败日志记录

From this image you can't tell what's going on. Thats a general crash. Check the event log. You could attempt to turn on Fusion Logging to see if an assembly is missing which could be causing the crash. Also File Monitor can help you see whats being loaded as well, but I would try Fusion first.
See
Enable Assembly Bind Failure Logging

耶耶耶 2024-12-17 20:36:43

好的;链接现在可以使用了。我建议您将应用程序主窗口代码包装在带有消息框或一些日志记录的 try catch 中,以详细跟踪该异常。

因此,在 Visual Studio 中,将 Program.cs 更改为:

    [STAThread]
    static void Main()
    {
       try{
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new Form1());
       } catch(Exception ex){
          MesasgeBox.Show(ex.ToString());
       }
    }

Ok; link's working now. I would recommend that you wrap your applications main window code in a try catch with a messagebox or some logging to trace that exception out in detail.

So, in Visual Studio, change your Program.cs to be like:

    [STAThread]
    static void Main()
    {
       try{
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new Form1());
       } catch(Exception ex){
          MesasgeBox.Show(ex.ToString());
       }
    }
流年已逝 2024-12-17 20:36:43

尝试查看 Windows 事件查看器(控制面板 -> 管理工具 -> 事件查看器)

在 Windows 日志 -> 下应用程序,.NET 运行时应该为您的应用程序添加一个条目,其中包含异常的详细信息。这可能有助于查明问题。

Try having a look at to the Windows event viewer (Control Panel -> Admin tools -> Event viewer)

Under Windows Logs -> Application, the .NET runtime should have added an entry for your application with details of the exception. This might help pinpoint the problem.

以为你会在 2024-12-17 20:36:43

您还可以附加一个远程调试器来查看发生了什么。

You could also attach a remote debugger to see whats going on.

晨敛清荷 2024-12-17 20:36:43

抱歉,我没有在我的系统中安装 CRRedist2008_x86.msi(Crystal report)....我安装后它就起作用了...感谢您的所有回答。

Sorry i didn't installed CRRedist2008_x86.msi(Crystal report) in my system....It worked as soon as i installed it...Thanks for all your answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文