.NET应用程序无法在其他计算机上运行 [英] .NET application does not work on other computers

查看:155
本文介绍了.NET应用程序无法在其他计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常复杂的.NET Windows.Forms应用程序。

它创建了一些标签式界面,其中托管(使用P / Invoke)另一个Windows.Forms应用程序的多个实例(也创建)由我),其中包含一个WebBrowser控件(与其他一些P / Invoke的东西)。



它在我的电脑上工作正常,可以很容易地编译和运行在其他安装了Visual Studio的计算机。



问题是如果复制到其他计算机上(没有Visual Studio)它根本不起作用。它不会给出任何错误或消息,它根本无法启动。它绝对没有。



当然它不依赖于位置(它没有硬编码的路径或其他东西)。

And,是的,另一台计算机安装了.NET Framework,等等。



由于它没有做任何事情,我无法进一步调查此问题。

所以,如果您有什么想法可以解决问题,请帮助我。

谢谢!

I have a very complex .NET Windows.Forms Application.
It creates something of tabbed interface in which it hosts (using P/Invoke) multiple instances of another Windows.Forms Application (also created by me), which features a WebBrowser Control (with some other P/Invoke stuff).

It works fine on my computer and can be easily compiled and run on other computers which have Visual Studio installed.

The problem is that it does not work at all if copied on other computers (without Visual Studio). It does not give any error or message, it simply does not start. It does absolutely nothing.

Of course it is not location dependent (it has no hard-coded paths or something).
And, yes, the other computer has .NET Framework installed, duh.

Since it does not do anything, I am unable to further investigate the issue.
So, if you have any ideas what the problem could be, please help me.
Thank you!

推荐答案

检查适用于初学者的非工作PC上的.NET框架版本。这可能有所帮助:让用户检查是否安装了.NET框架的安全方法 [ ^ ]



然后检查系统类型/您的应用程序类型:确保您没有尝试在32位计算机上运行64位应用程序。



然后检查所有的DLL你的应用程序使用P / Invoke访问存在,正确的版本,并且可用。



如果所有这些都有效,请首先创建一个简单的应用程序并尝试。如果它工作,添加一些复杂性,直到找到缺少的东西 - 它可能是一个DLL调用DLL或类似的,所以只要继续,直到找到不起作用的东西!
Check the version of the .NET framework on the non-working PCs for starters. This may help: A safe way to get the user to check if the .NET framework is installed[^]

Then check the system type / your app type: make sure you aren't trying to run 64bit apps on a 32 bit machine.

Then check that all the DLLs your app uses P/Invoke to access are present, the correct version, and available.

If all of that works, start by creating a trivial app and try that. If it works, add some complexity until you find what is missing - it may be that a DLL that calls a DLL or similar, so just keep going until you find something that doesn't work!


这篇关于.NET应用程序无法在其他计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆