.NET 2.0 程序 (VS 2005) 在 Visual Studio 中运行,但不能从 Windows 资源管理器运行

发布于 2024-07-22 05:13:45 字数 611 浏览 3 评论 0原文

有人见过这个吗?

有几秒钟的延迟,然后其中一个对话框显示“Yada Yada 遇到问题,需要关闭。对于给您带来的不便,我们深表歉意。” (这很奇怪,因为我的程序有一个异常的处理系统,如果在我的代码中抛出异常,它会给出有用的错误消息,但显然没有达到这一点:如果您尝试运行此对话框,则会看到相同的东西未安装 .NET 的计算机上的 .NET 程序。)此相同的二进制文件可以在其他 Windows 系统上运行。

我尝试重新安装.NET 2.0。 我尝试删除它(不允许我)。 我尝试“更改”它(显然没有任何变化)。 我尝试重新发布我的项目 (ClickOnce),它仍然可以在其他计算机上运行,​​但不能在我的开发计算机上运行,​​除非在 Visual Studio 中。 我尝试删除已安装的 ClickOnce 项目并重新安装,但它仍然无法启动该程序。

我发现的最接近的东西是这个(阅读他的澄清)但这些解决方案都不起作用。

我正在考虑重命名该程序并重新发布和重新安装,看看它是否与神秘的 GAC 或邪恶的注册表有关。

Has anyone seen this?

There is a few second delay, then one of those dialog boxes saying "Yada Yada has encountered a problem and needs to close. We are sorry for the inconvience." (This is weird because my program has an exceptional handling system that gives useful error messages if the exception is thrown within my code, but it is clearly not reaching that point: this dialog is the same sort of thing you see if you try to run a .NET program on a machine without .NET installed.) This same binary runs on other Windows systems.

I tried reinstalling .NET 2.0. I tried Removing it (won't allow me). I tried "Change"ing it (nothing apparently changes). I tried republishing my project (ClickOnce) and it still works on other machines but not on my development machine, except within Visual Studio. I tried Removing that installed ClickOnce project and reinstalling, but it still will not launch the program.

The closest thing I've found is this (read his Clarification) but none of those solutions worked.

I'm considering renaming the program and republishing and reinstalling to see if it has something to do with the mysterious GAC or the evil registry but.

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

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

发布评论

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

评论(6

秋凉 2024-07-29 05:13:45

使用事件查看器检查应用程序事件日志。 您可能不会获得很多信息,但有时它可以为您指明正确的方向。

Check the Application Event Log using the Event Viewer. You probably won't get a lot of information, but sometimes it can point you in the right direction.

你又不是我 2024-07-29 05:13:45

在应用程序事件部分有什么可以捕获和报告未处理的异常的东西吗?

do you have anything that catches and reports unhandled exceptions in the application events section?

乖乖 2024-07-29 05:13:45

我还建议手动将 EXE 和 Dll 复制到目录中,并获取 Reflector 的副本并使用 Reflector 打开主应用程序 exe,然后浏览所有引用。 也许存在某种依赖性,它需要不同的版本或 Gac 中较旧的内容,而您认为已将其删除。

还要找到程序中的入口点,看看 Reflector 认为它在做什么。

I'd also suggest doing the manual copy of the EXE and Dll's to a directory, and getting yourself a copy of Reflector and open your main application exe with reflector, then walk through all the references. Maybe there is some dependency where it is expecting a different version or something in the Gac that is older and you thought you'd removed it.

Also find the entry point in your program and see what Reflector thinks it is doing.

最美的太阳 2024-07-29 05:13:45

您是否尝试过可再发行组件(vcredist_x86.exe)?

have you tried the redistributable ( vcredist_x86.exe )?

末骤雨初歇 2024-07-29 05:13:45

您是否尝试过手动将 exe 和支持文件复制到计算机而不是使用发布? 也不是说你想经历这些麻烦,而是在我们的机器上偶尔会出现这样的问题,我们安装了 Visual Studio 的副本,因此它会出现调试或关闭提示,我们点击调试并复制源代码它要求的代码文件,我们可以看到更多细节。

have you tried manually copying the exe and supporting files to the machine instead of using publish? Also not that you want to go through the hassle, but on our machine that occasionally has a problem like this we have a copy of Visual Studio installed, so it comes up with a debug or close prompt, we hit debug and copy down the source code file it asks for and we get to see more details.

不打扰别人 2024-07-29 05:13:45

直接双击编译器输出时它不会运行? 如果是这样,通常为我解决这个问题的方法是为项目中引用的所有 DLL 指定 Copy Local = True。

It doesn't run when you double-click your compiler output directly? If so, What's usually solved this for me, is specifying Copy Local = True for all DLLs referenced in the project.

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