Tutorials » AspNet tutorials »

The "Build" process

This article gives an introduction to the "build" and "debug" process using VWD.

We have mentioned the term couple of times earlier in this tutorials. If you are very new to programming, you may be wondering what is meant by "build".

Any one with basic programming knowledge will know that you must compile a source file before you can execute it. A compilation process will convert the source file into a binary executable file.

If you have 10 web pages in a web project, you must compile each of these 10 files into 1 or more binary executables. If you are using notepad to develop web applications, you have to use command line tools to compile each file.

VWD and VS.NET comes with a handy feature to compile and organize all source files. This process is usually referred to as "build" process.

Before you can run a web site, you must build the project - which means that you must compile all files files of the project.

Compiling files from command line is a pain. You have to pass several parameters to the compiler command. You must specify the source file to compile, the name of the binary executable to be generated etc.

How to build a web site using VWD ?

When you use VWD to build a web site - it is just one button click. There are couple of ways you can do this in VWD:

1. Click on the shortcut toolbar for Build
2. Use the menu option Build -> Build Solution
3. Use the keyboard shortcut Ctrl + Shift + B

When you use any of the above optiosn to build a solution, VWD does the following:

1. Identifies all the files part of the project.
2. Checks for compilation errors for each file in the solution.

Older versions of ASP.NET projects used to compile all the source files into an assembly and put them into a folder called "Bin". From ASP.NET 2.0 onwards, there won't be any "bin" folder created. Instead, source files will be compiled dynamically when a request is made for that particular piece of code. However, when you "build" the solution using VWD, it verifies each file for compilation errors to avoid any compilation error during run time.

How to run the web site from VWD ?

Pressing Ctrl + Shift + B will only build the web site, but it will not launch the site. There is another short cut to build and launch the web site with one step. There are different ways you can do this:

1. Click on the shortcut toolbar "View in Browser" (this step will not check for compilation errors)
2. Use the menu option Debug -> Start without Debugging
3. Use the keyboard shortcut Ctrl + F5

You may notice another menu option called Debug -> Start Debugging. This option will also compile and launch the web site in debug mode. You will learn more about debugging later in this tutorials.

Next Chapter: ASP.NET 2.0 and Bin folder
Previous Chapter: Creating a new web application - behind the scenes
More Chapters: ASP.NET Tutorials
More Tutorials: Tutorial Index

Top Contributors
    Last 7 Daysmore...

    Awards & Gifts

    Online Members

    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India