且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获得我创建的exe以在多台计算机上运行?

更新时间:2022-12-23 22:46:25

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


您必须复制整个目录它发布时,如果你想使用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.