如何获得我创建的exe以在多台计算机上运行? [英] How to get an exe i created to run on multiple computers?

查看:59
本文介绍了如何获得我创建的exe以在多台计算机上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个简单的程序,它有一个关闭按钮和一个ping按钮。当您单击ping按钮时,硬编码为ping特定网站并返回到richtextbox返回的IP地址。我在VS 2010 pro的Windows 7机器上构建它,然后选择Build>构建控制台应用。它创建了一个.exe,我在我的计算机上启动并安装,以确保它运行它。然后我将文件发送到不同的计算机,它不会安装(Windows 7机器)。它给出了这个错误:

I wrote a simple program that has a close button and a ping button. When you click the ping button it is hard coded to ping a specific website and return into the richtextbox the ip address returned. I built it on a windows 7 machine in VS 2010 pro then chose to Build > Build console app. It created an .exe that I launched on my computer and installed to make sure it ran which it did. I then sent the file to a different computer where it wouldn''t install (windows 7 machine as well). It gave this error:

展开 | 选择 | Wrap | 行号

推荐答案

看起来你已发布了您的应用程序,然后尝试复制发布导致的其中一个文件。这只是不起作用。


您必须复制整个目录它发布时,如果你想使用ClickOnce部署。


否则,你可以只构建项目,然后进入项目目录的/ bin / debug文件夹并复制从那里执行。那将是没有安装,只是作为一个应用程序运行。
It looks like you "published" your application, then tried to copy just one of the files that the publish resulted in. That''s just not going to work.

You''d have to copy the entire directory that it published, if you want to use the ClickOnce deployment.

Otherwise, you can just build the project, then go into the /bin/debug folder of the project directory and copy the executable from there. That will have NO installation, just run as an application.


我选择发布它然后我移动了setup.exe它创造了。这不是整个计划吗?如果不是这样的话我会创建一个人们可以在没有我拥有的每个文件的情况下运行的应用程序吗?
I chose to publish it then I moved the "setup.exe" it created. Is that not the entire program? If it is not how the heck do I make an application that people can run without having every single file I have?


" Publish"创建一种可安装的包部署。它应该托管在Web服务器上,或通过CD分发或安装在共享驱动器上。它不是你想象的实际设置文件。所有setup.exe都会启动.application文件。


如果您有完整版本的Visual Studio,则可以创建一个真正安装程序的安装程序包。如果你有Express,那就不行了。有第三方安装人员,但我没有这方面的经验。


你的第三个选择是做我之前提到的。在项目的Bin目录中找到可执行文件并进行分发。它不会作为安装程序运行,它将作为程序运行。但是如果您的应用程序依赖于DLL,那么也必须复制它们。
"Publish" creates a sort of installable package deployment. It''s supposed to be either hosted on a web server or distributed via CD or installed off a shared drive. It''s not an actual setup file as you would think. All setup.exe does is start the .application file.

If you have a full version of Visual Studio, you can create a setup package that is a true installer. Not if you have Express though. There are third party installers, but I have no experience with that.

Your third alternative is to do what I mentioned earlier. Find the executable in the Bin directory of the project and distribute that. It won''t run as an installer, it will run as a program. But if your application relies on DLLs, those have to be copied as well.


这篇关于如何获得我创建的exe以在多台计算机上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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