vb.net Visual Basic 2010,通过从bin中获取exe文件或发布来完成您的项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29878157/
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 19:03:47  来源:igfitidea点击:

Visual Basic 2010, finishing your project by getting the exe file from bin, or publishing

vb.netvisual-studio-2010projectpublishing

提问by SixPackScript

ok so i made a couple of projects in VB2010 and i want to finally make them a standalone executable , as i'm still a beginner in VB ! i don't know if getting the .exe file only from "bin/debug" or i should really publish it then need the applications folder and the setup [because it's gonna be a lot better if i don't have to do the second one], anyways i tried to get the exe file then move the project folder to another drive , and it work , i know that to run the exe in other computer i'll need framework , [as far as i know my resource files are embedded into the exe] but if i need framework only , i guess runing it on computers that doesn't have it will ask them to download it ! i don't mind that , or that option comes with publish ,and i also really need the manifest file to run it normally ,
I actually don't know much about this so can you pleas tell me what i exactly need so my .exe files can run on other computers
sorry for taking some of your time , and thank you for reading this :D

好的,所以我在 VB2010 中做了几个项目,我想最终使它们成为独立的可执行文件,因为我仍然是 VB 的初学者!我不知道是否只从“bin/debug”获取 .exe 文件,或者我真的应该发布它然后需要应用程序文件夹和设置 [因为如果我不必做第二个,它会好得多一个],无论如何,我试图获取 exe 文件,然后将项目文件夹移动到另一个驱动器,它可以工作,我知道要在其他计算机上运行 exe,我需要框架,[据我所知,我的资源文件是嵌入到 exe 中] 但如果我只需要框架,我想在没有它的计算机上运行它会要求他们下载它!我不介意,或者该选项带有发布,而且我也确实需要清单文件才能正常运行它,
我实际上对此知之甚少,所以请您告诉我我到底需要什么,以便我的 .exe 文件可以在其他计算机上运行,
抱歉占用您一些时间,感谢您阅读本文 :D

回答by

Set your Solution Configurationsto Release, build a solution (Ctrl+Shift+B) then navigate to your bin/Releasefolder and there you will find your exe file ready to be shipped. You can ship that exe as is, or you can wrapp it up in an installer application. If your application has some dependencies then shipping the exe file will not be enough.

将您设置Solution ConfigurationsRelease,构建一个解决方案 (Ctrl+Shift+B),然后导航到您的bin/Release文件夹,您会在那里找到准备发送的 exe 文件。您可以按原样发送该 exe,也可以将其打包在安装程序中。如果您的应用程序有一些依赖项,那么传送 exe 文件是不够的。

回答by Damian Beukes

You can change your target framework by goin' to Project/Properties. Find the .exe in \\Your app\bin\debug\your app.exe

您可以通过转到 来更改您的目标框架Project/Properties。在里面找到.exe\\Your app\bin\debug\your app.exe

回答by TGamer

What you can do,open the project as if going to edit it, just go to "Project" then "Publish(Whatever-your-work's-name-is).vb at the bottom. Then use the wizard to finish. At the end, say you saved your exe on the desktop, three files will appear.

你可以做什么,打开项目就像要编辑它一样,只需转到“项目”然后“发布(无论您的工作名称是什么)。vb 在底部。然后使用向导完成。在最后,假设您将exe保存在桌面上,将出现三个文件。

  1. "Whatever-your-work's-name-is".exeAnd its icon shape varies.
  2. A folder called "Application Files"
  3. And a "setup.exe"Its icon a like a CD on something.
  1. "Whatever-your-work's-name-is".exe其图标形状各不相同。
  2. 一个名为“应用程序文件”的文件夹
  3. 还有一个“setup.exe”,它的图标就像是某种东西上的 CD。

For the first time, click on setup.exeand open the app. From then on, the "Whatever-your-work's-name-is".exewill open normally. I have a website where I publish these things for fun, "tgamer.myfreesites.net", and downloading will only download all three in a zipped folder. The website is not awesome, but it's alright.

第一次,单击setup.exe并打开应用程序。从那时起,“Whatever-your-work's-name-is”.exe将正常打开。我有一个网站,我在那里发布这些东西是为了好玩,“tgamer.myfreesites.net”,下载只会在一个压缩文件夹中下载所有三个。该网站不是很棒,但还可以。

The thing is, the setup.exe and application files can be in a zipped file. You only the actual exe from the second opening and onward. This option makes it downloadable, like what I want. For you, choose the best for you, but remember downloading only the exe will not work.

问题是,setup.exe 和应用程序文件可以在一个压缩文件中。从第二次开放开始,您只是实际的 exe。这个选项使它可以下载,就像我想要的那样。对你来说,选择最适合你的,但记住只下载 exe 是行不通的。