vb.net 仅发布为 .exe 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18172003/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 14:36:37  来源:igfitidea点击:

vb.net publishing as .exe file only

vb.netexe

提问by MaBi

I want to simply publish my programm as .exe. I don't want to have that Application Folder, inf File and manifest, which are created by Visual Studio 2010. Later on it can be downloaded over an FTP.

我想简单地将我的程序发布为 .exe。我不想拥有由 Visual Studio 2010 创建的应用程序文件夹、inf 文件和清单。稍后可以通过 FTP 下载它。

How to do so? I've also looked at these publish on webhost functionality of VS, but that would create a publish.htm. And that's not what I want.

怎么做?我还查看了 VS 的 webhost 功能上的这些发布,但这会创建一个 publish.htm。这不是我想要的。

回答by Ahmed Mobarako

you have a folder named release in your project the .exe file is what you want

你的项目中有一个名为 release 的文件夹,.exe 文件就是你想要的

if it's empty then in your VS toolbar next to the ( play , pause , stop ) buttons there is a combo box choose release and click on the play button then the .exe file should be generated

如果它是空的,那么在你的 VS 工具栏中(播放、暂停、停止)按钮旁边有一个组合框,选择释放并点击播放按钮,然后应该生成 .exe 文件

if you referenced any .dll files then they should be copied as so with the .exe file to make it work

如果您引用了任何 .dll 文件,则应将它们与 .exe 文件一起复制以使其正常工作

you may add dll's as resource files in your .exe as binary text then when the program run's add code to put them in files in .exe same path and when the program end's add delete code

您可以将 dll 作为资源文件添加到 .exe 中作为二进制文本,然后当程序运行的添加代码将它们放在 .exe 相同路径中的文件中,以及当程序结束时添加删除代码