You are here:

Visual Basic/Visual Basic 2010 Express


QUESTION: I am using Visual Basic 2012 Express and had trouble locating the function to expell the program into a stand-alone .exe and could only find the "Publish" button while back when I first learned VB they had a "compile" option. The Publish button seems to give me a setup file for installation while before I never had to install any programs I wrote. Just ran the .exe and made sure my computer had the proper .dll files available. Is there anyway to compile it the way I used to be able to? Many people, myself included get paranoid about installing software versus just running it after a viral scan.

ANSWER: Dear James,

Open your project, on the Menu bar go to "Tools", check "Expert Settings" - this will change your menus.

Click on "Build" menu - you'll see Build option now.



---------- FOLLOW-UP ----------

QUESTION: How do I determine where the file is built? Will it be a stand-alone .exe file?

ANSWER: Dear James,

On the VB 2010 screen at the right you can see 'Solution Explorer'.  And in this 'Solution Explorer' column, on the top, there is a button 'Show all files' - click on it. You'll see extra folders appear. Click on Bin\Release - there you'll see your .EXE file.

You'll need to copy all the files from Bin\Release folder.

As always with Visual Basic you need VB Runtime along with all those files. The easiest way is to use Publish button - you can publish it to your temporary directory on development machine and then use this directory content to distribute your application.



---------- FOLLOW-UP ----------

QUESTION: So than are you saying the program can't run simply by handing off the .exe file only like the old days? I have to include everything else that was in the Bin/Release directory?


Short answer is yes. The long answer has a lot of 'if'. As far as I know, you can copy an EXE file whenever you want on the computer with Microsoft Visual Basic Express 2010 installed, and it will run - but only on this computer.  It will not run properly on any other computer - if you do not install all the support files on that other computer. Again, as far as I know this was this way from at least Visual Basic 5. That's why I've suggested you to use Publish menu option - which is default for Microsoft Visual Basic Express 2010.



Visual Basic

All Answers

Answers by Expert:

Ask Experts




Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications. You can ask me any Visual Basic questions and some questions about .NET Framework. You can also ask me how to use Component One controls in Visual Basic. Do not ask me questions about Web design and development in Visual Basic.


I'm working as VB programmer from 1997, so I have a lot of experience with Visual Basic .NET as well as Visual Basic 6. Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications; Component One controls for Visual Basic; User controls; Moving VB6 applications to .NET.

B.S. in Computer Science

©2016 All rights reserved.