简体   繁体   English

C#Windows窗体项目在其他计算机上加载空白

[英]C# Windows Form Project Loading Blank On Other Machines

I searched around but I could not find anything on this. 我四处搜寻,但找不到任何东西。

I have programmed ac# application in VS 2010, targeted to .NET Framework 4.0. 我已经在VS 2010中针对NET Framework 4.0编程了ac#应用程序。 It has a .DLL and a few config files which I have being copied to the output directory upon compilation. 它有一个.DLL和一些配置文件,我在编译时已将它们复制到输出目录。 It works great on my computer, I have .NET 4.0 Extended and .NET 4.0 Client installed. 它在我的计算机上运行良好,安装了.NET 4.0 Extended和.NET 4.0 Client。 I set the build configuration to "release" on "any CPU". 我在“任何CPU”上将构建配置设置为“发布”。

After it compiles I copy all the files from the release directory to a folder on a shared drive, so that multiple computers on the network can execute it. 编译后,我将所有版本从发行目录复制到共享驱动器上的文件夹中,以便网络上的多台计算机可以执行它。 When I execute it from the computer that I used to develop it, it runs great. 当我从用来开发它的计算机上执行它时,它运行良好。 When others try to execute it starts but just shows a small blank form, and that's it. 当其他人尝试执行时,它开始但仅显示一个小的空白表格,仅此而已。 I make sure that they have .NET 4.0 installed (Both Extended and Client, though I think the full version is what is really required). 我确保他们已经安装了.NET 4.0(扩展和客户端都可以,尽管我认为完整的版本才是真正需要的)。

I can't for the life of me figure out why it does this. 我无法为自己的一生弄清楚为什么要这么做。

All machines are running 32 Bit Windows Vista SP2. 所有计算机都运行32位Windows Vista SP2。

Any thoughts? 有什么想法吗? Much appreciation for any help. 非常感谢您的帮助。

It can be a lot of things. 可能有很多事情。 First, like one comment, you should do a quick Deployment project and try to install on another computer to see how it work. 首先,像评论一样,您应该执行一个快速的Deployment项目,然后尝试在另一台计算机上安装以查看其工作方式。

If you can't do that, here a couple of things to check: 如果您无法执行此操作,请检查以下几项:

  1. It can be a network permission problem. 这可能是网络权限问题。 I've seens an .NET application that could not be executed on the network for x reason but worked on the desktop. 我见过一个.NET应用程序,由于x原因无法在网络上执行,但可以在桌面上运行。 To check, make sur your user copy it on their computer before executing. 要进行检查,请确保您的用户在执行之前将其复制到他们的计算机上。
  2. I don't think it's a .NET problem because it wouldn't let you start the application. 我认为这不是.NET问题,因为它不会让您启动应用程序。
  3. My guess is that one of your control/library (the one that is not showing) does not have the proper reference when run from another computer. 我的猜测是,从另一台计算机运行时,您的控件/库之一(未显示)没有正确的引用。 To check, run the application "Dependency Walker" (you can find it on google) and see what DLL are missing from other computers. 要进行检查,请运行应用程序“ Dependency Walker”(您可以在Google上找到它),并查看其他计算机上缺少的DLL。

That's all I can think for now ! 这就是我现在能想到的! Good luck! 祝好运! You just have to use ellimination method and you will find the problem. 您只需要使用消除方法,就会发现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM