An executable is an application that can be used
on a computer that doesn't have the programming environment that was used
to create the application. Microsoft Visual Studio .NET makes it
particularly easy to create an executable. In the past, there were issues
about DLLs or missing libraries. With the new features, since the user (or
you) must make that the target computer has the Microsoft .NET Framework
installed, this reduces concern on your part. In fact, this is so easily
taken care of on new versions of Microsoft Windows that, since they ship
with the framework, after creating your application, you can simply copy
it to a floppy disk and install it on the target computer. There is not
more to do than that.
|
Practical Learning: Creating an Executable |
|
- Start Microsoft Visual Studio .NET and, to create a new application,
on the main menu, click File -> New -> Project...
- In the Project Types section, click Visual C++ Projects
- In the Templates section, click Empty Project (.NET)
- In the Name box, type BodyTag then specify the Location and
click OK
-
- On the menu, click Project -> Add Resource...
- In the Add Resource dialog box, double-click Icon
- In the Properties window, change the Filename of the icon to bodytag.ico
- Design the 32x32 icon as follows:
- On the main menu, click Image -> New Image Type...
- Select 16x16, 16 colors and click OK
- Design the icon as follows:
- On the main menu, click Project -> Add New Item...
- In the Templates section, click C++ File (.cpp)
- In the Name box, type Exercise and click Open
- In the empty file, enter the code
for the application
- To create a release version, on the Standard toolbar, click the
arrow of the Solution Configurations combo box and select Release
- To create the executable, on the main menu, click Debug -> Start
Without Debugging or press Ctrl + F5
- When asked to save the project, click Yes
- After viewing the application, click it
- To get the executable, open My Computer or Windows Explorer and open
the Release folder of the current project. You can then copy it to
floppy disk and install it on a computer that has the Microsoft .NET
Framework.
|
A more professional way to install an application on a
computer consists of creating a project on its own that will take care of
installing the necessary files in the right folder(s) of the user's
computer. This process is also referred to as deploying an application.
As obvious as it appears, before distributing your
application, you must first have it. Therefore, you can start by creating
a complete application and executing it to create an executable file. Once
you have a project that contains the ready-made application, to create its
deployment, on the main menu of Visual Studio .NET, you can click File
-> Add Project -> New Project... In the Project Types list of the
Add New Project dialog box, you can click Setup And Deployment Projects.
In the Templates section, you can click one of the icons. In the Name text
box, give a name to the project and click OK.
|
|
|