Visual Studio .NET IDE
Visual Studio .NET IDE (Integrated Development Environment) is the Development Environment for all .NET based applications which comes with rich features. VS .NET IDE provides many options and is packed with many features that simplify application development by handling the complexities. Visual Studio .NET IDE is an enhancement to all previous IDE’s by Microsoft.
Important Features
One IDE for all .NET Projects
Visual Studio .NET IDE provides a single environment for developing all types of .NET applications. Application’s range from single windows applications to complex n-tier applications, rich web applications, Web Services, Windows Services, Mobile applications, Console Applications etc.,
Option to choose from Multiple Programming Languages
You can choose the programming language of your choice to develop applications based on your expertise in that language. The major programming languages supported by the Visual Studio are C#, VB.Net, F#, J#, C++ etc., You can also incorporate multiple programming languages in one .NET solution and edit that with the IDE.
Option to choose from Multiple Frameworks
You can choose a specific framework to develop the project for your specific target platform. Also you can have multiple projects with multiple frameworks under single solution.
IDE is Customizable
You can customize the IDE based on your preferences. The Options under Tools menu settings allow you to do this. With these settings you can set the IDE screen the way you want, the way the keyboard behaves and you can also filter the help files based on the language of your choice. You can select fonts, colors of your coding window.
You can also change the Text Editor properties for various languages. If you want to store your settings you can Import and Export your settings.
Built-in Browser
The IDE comes with a built-in browser that helps you browse the Internet without launching another application. You can look for additional resources, online help files, source codes and much more with this built-in browser feature.
When we open VS .NET from Start->Programs->Microsoft Visual Studio .NET->Microsoft Visual Studio .NET the window that is displayed first is the Start Page which is shown below. The start Page allows us to select from the most recent projects (last four projects) with which we worked or it can be customized based on your preferences.
The Integrated Development Environment (IDE) shown in the image below is what we actually work with. This IDE is shared by all programming languages in Visual Studio. You can view the toolbars towards the left side of the image along with the Solution Explorer window towards the right.
New Project Dialogue Box
The New Project dialogue box like the one in the image below is used to create a new project specifying it's type allowing us to name the project and also specify it's location on the disk where it is saved. The default location on the hard disk where all the projects are saved is C:\DocumentsandSettings\Administrator\MyDocuments\VisualStudioProjects.
Following are different templates under Project Types and their use:
Windows Application: This template allows you to create standard windows based applications.
Class Library: Class libraries are those that provide functionality similar to Active X and DLL by creating classes that access other applications.
Windows Control Library: This allows you to create our own windows controls. Also called as User Controls, where you group some controls, add it to the toolbox and make it available to other projects.
ASP .NET Web Application: This allows you to create web-based applications using IIS. We can create web pages, rich web applications and web services.
ASP .NET Web Service: Allows you to create XML Web Services.
Web Control Library: Allows you to create User-defined controls for the Web. Similar to user defined windows controls but these are used for Web.
Console Application: A new kind of application in Visual Studio .NET. They are command line based applications.
Windows Service: These run continuously regardless of the user interaction. They are designed for special purpose and once written, will keep running and come to an end only when the system is shut down.
Other: This template is to develop other kinds of applications like enterprise applications, database applications, Setup and Deployment etc.
Solution Explorer Window
Solution Explorer provides you with an organized view of your projects and their files as well as ready access to the commands that pertain to them. A toolbar associated with this window offers commonly used commands for the item you highlight in the list. To access Solution Explorer, select Solution Explorer on the View menu. An image of the Solution Explorer window is shown below.
Server Explorer Window
The Server Explorer window is a great tool that provides "drag and drop" feature and helps us work with databases in an easy graphical environment. For example, if we drag and drop a database table onto a form, VB .NET automatically creates connection and command objects that are needed to access that table. The image below displays Server Explorer window.
Class View
Class View displays the symbols defined, referenced, or called in the application you are developing. You can open Class View from the View menu. There are two panes: an upper Objects pane and a lower Members pane. The Objects pane contains an expandable tree of symbols whose top-level nodes represent projects. To expand a node selected in the tree, click its plus (+) sign or press the plus (+) key on the keypad.
Intellisense
Intellisense is what that is responsible for the boxes that open as we type the code. IntelliSense provides a list of options that make language references easily accessible and helps us to find the information we need. They also complete the typing for us. The image below displays that.
IntelliSense provides an array of options that make language references easily accessible. When coding, you do not need to leave the Code Editor or the Immediate Mode command window to perform searches on language elements. You can keep your context, find the information you need, insert language elements directly into your code, and even have IntelliSense complete your typing for you.
IntelliSense comprises the following options:
- List Members
- Parameter Info
- Quick Info
- Complete Word
- Automatic Brace Matching
The properties window allows us to set properties for various objects at design time. For example, if you want to change the font, font size, backcolor, name, text that appears on a button, textbox etc, you can do that in this window. Below is the image of properties window. You can view the properties window by selecting
View->Properties Window from the main menu or by pressing F4 on the keyboard.
Code Definition Window
The Code Definition window is a read-only editor view that displays the definition of a symbol in a code file stored in, or referenced by, the active project. To display this window, select Code Definition Window from the View menu. When the window first opens, it displays the definition for the last symbol selected. If no definition is available, No definition selected is displayed. This window can be docked along any convenient edge of the integrated development environment (IDE). By default, it is displayed beneath the Code Editor.
Command Window
The Command window is used to execute commands or aliases directly in the Visual Studio integrated development environment (IDE). You can execute both menu commands and commands that do not appear on any menu. To display the Command window, choose Other Windows from the View menu, and select Command Window.
You can view the command window by selecting
View->Other Windows->Command Window from the main menu. The command window in the image displays all possible commands with File.
Output Window
This window can display status messages for various features in the integrated development environment (IDE). It displays the results of building and running applications. To display the Output window, select Output from the View menu. To close the Output window and shift focus back to the Editor, press the Escape (ESC) key.
Object Browser
The Object Browser allows you to select and examine the symbols available for use in projects. You can open the Object Browser from the View menu, or by clicking the Object Browser button on the main toolbar.
There are three panes: an Objects pane on the left, a Members pane on the upper right, and a Description pane on the lower right. If you resize the Object Browser into a single column, the Objects pane moves to the top, the Members pane to the middle, and the Description pane to the bottom.
In the Objects pane, icons identify hierarchical structures such as .NET Framework and COM components, namespaces, type libraries, interfaces, enums, and classes. You can expand these structures to reveal ordered lists of their members. Properties, methods, events, variables, constants, and other contained items are listed in the Members pane. Details on the item selected in the Objects or Members pane appear in the Description pane.
You can view the object explorer window by selecting View->Other Windows-> Object Browser from the main menu.
Error List Window
The Error List helps you speed application development. In the Error List window, you can:
- Display the Errors, Warnings, and Messages produced as you edit and compile code.
- Find syntax errors noted by IntelliSense.
- Find deployment errors, certain Static Analysis errors, and errors detected while applying Enterprise Template policies.
- Double-click any error message entry to open the file where the problem occurs, and move to the error location.
- Filter which entries are displayed, and which columns of information appear for each entry.
To display the Error List, on the View menu choose Error List.
Use the Errors, Warnings, and Messages buttons to select which entries to display.
Call Stack Window
By using the Call Stack window, you can view the function or procedure calls that are currently on the stack.
The Call Stack window displays the name of each function and the programming language it is written in. The function or procedure name may be accompanied by optional information, such as module name, line number, byte offset, and parameter names, types, and values. The display of this optional information can be turned on or off.
You can use the Watch window to evaluate variables and expressions and keep the results. You can also use the Watch window to edit the value of a variable or register.
To open the Watch window, the debugger must be running or in break mode. From the Debug menu, choose Windows, then Watch, and click on Watch1, Watch2, Watch3, or Watch4.
Task List Window
The Task List helps you create and manage a list of programming tasks. In the Task List window, you can:
- Enter notes on work to be done as User Tasks. For more information.
- Display Task Comments that link to lines in your code files where work must be done. For more information
- Display custom Categories of task messages.
To display the Task List, on the View menu, click Task List. Use the Categories drop-down list to select which entries to display.