0% found this document useful (0 votes)
25 views32 pages

Module 2: Development Environment Features

This document discusses features of the Visual Basic .NET integrated development environment (IDE). It describes creating VB.NET projects, using features like Solution Explorer and the Object Browser. It also covers debugging applications using breakpoints and watch windows, and compiling projects. The IDE provides a customizable environment for building .NET applications in multiple languages using features like debugging tools and code navigation aids.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views32 pages

Module 2: Development Environment Features

This document discusses features of the Visual Basic .NET integrated development environment (IDE). It describes creating VB.NET projects, using features like Solution Explorer and the Object Browser. It also covers debugging applications using breakpoints and watch windows, and compiling projects. The IDE provides a customizable environment for building .NET applications in multiple languages using features like debugging tools and code navigation aids.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

Module 2: Development

Environment Features
Overview

 Describing the Integrated Development Environment


 Creating Visual Basic .NET Projects
 Using Development Environment Features
 Debugging Applications
 Compiling in Visual Basic .NET
Describing the Integrated Development Environment

 There is one IDE for all .NET projects


 Solutions can contain multiple programming languages
 Example: Visual Basic .NET and C# in the same solution
 The IDE is customizable through “My Profile”
 The IDE has a built-in Internet browser
 Creating Visual Basic .NET Projects

 Choosing a Project Template


 Analyzing Project Structures
 What Are Assemblies?
 Setting Project References
 What Are Namespaces?
 Creating Namespaces
 Importing Namespaces
 Setting Project Properties
Choosing a Project Template

 Windows Application
 Class Library
 Windows Control Library
 ASP .NET Web Application / Service / Control Library
 Console Application
 Windows Service
 Others
Analyzing Project Structures

 Solution files (.sln, .suo)


 Project files (.vbproj)
 Local project items
 Classes, forms, modules, etc. (.vb)
 Web project items
 XML Web services (.asmx)
 Web forms (.aspx)
 Global application classes (.asax)
What Are Assemblies?

 An assembly is an .exe or .dll file with other supporting files


that make up a Visual Studio .NET application
 The .NET Framework provides predefined assemblies
 Assemblies are created automatically when you compile
source files
 Click Build on the Build menu
 Use the command-line command vbc.exe
Setting Project References

 .NET assemblies
 COM components
 Projects
What Are Namespaces?

 Namespaces organize objects defined in an assembly


 Group logically related objects together
 Namespaces create fully qualified names for objects
 Prevent ambiguity
 Prevent naming conflicts in classes
Creating Namespaces

 Use Namespace … End Namespace syntax


 Use the root namespace defined in Assembly Properties

Namespace
Namespace Top
Top 'Fully
'Fully qualified
qualified as
as MyAssembly.Top
MyAssembly.Top
Public
Public Class
Class Inside
Inside 'Fully
'Fully qualified
qualified as
as MyAssembly.Top.Inside
MyAssembly.Top.Inside
...
...
End Class
End Class
Namespace
Namespace InsideTop
InsideTop 'Fully
'Fully qualified
qualified as
as MyAssembly.Top.InsideTop
MyAssembly.Top.InsideTop
Public Class Inside
Public Class Inside
'Fully
'Fully qualified
qualified as
as MyAssembly.Top.InsideTop.Inside
MyAssembly.Top.InsideTop.Inside
...
...
End Class
End Class
End
End Namespace
Namespace
End Namespace
End Namespace
Importing Namespaces

 Fully qualified names can make code hard to read


Dim
Dim xx as
as MyAssembly.Top.InsideTop.Inside
MyAssembly.Top.InsideTop.Inside

 Using the Imports statement results in simpler code by


providing scope
Imports
Imports MyAssembly.Top.InsideTop
MyAssembly.Top.InsideTop
...
...
Dim
Dim xx as
as Inside
Inside

 Import aliases create aliases for a namespace or type


Imports
Imports ITIT == MyAssembly.Top.InsideTop
MyAssembly.Top.InsideTop
...
...
Dim
Dim xx as
as IT.Inside
IT.Inside
Setting Project Properties

 Common Property Settings


 Defining assembly name
 Root namespace
 Project output type
 Startup object
 Importing project-level namespaces
 Configuration Property Settings
 Debugging settings
 Build options
Demonstration: Creating a Visual Basic .NET Project
 Using Development Environment Features

 Using Solution Explorer


 Using Server Explorer
 Using the Object Browser
 Using the Task List
 Using Dynamic Help
 Using XML Features
 Recording and Using Macros
Using Solution Explorer

 Displays project hierarchy


 Project references
 Forms, classes, modules
 Folders with subitems
 “Show All Files” mode
 Manipulating projects
 Drag-and-drop editing
 Context menus
Using Server Explorer

 Managing Data Connections


 Viewing and Managing
Servers
 Using Drag-and-Drop
Techniques
Using the Object Browser
Library

 Examine objects and their


members
 Access lower-level items
 Shows inheritance
and interfaces
 Examine how the .NET
Framework class libraries
use Inheritance

Method
Class Namespace
Inheritance
Using the Task List

 Similar to the Tasks feature in Microsoft Outlook


 Stored with the solution in the .suo file
 Adding to the Task List
 You can add tasks manually by typing in appropriate field
 Visual Basic .NET adds build errors, upgrade comments, etc.
 You can use token strings to add comments in code
Using Dynamic Help

 Automatically displays
relevant Help topics based
on focus and cursor
placement
 Use the Options dialog box
to configure the Dynamic
Help window
Using XML Features

 HTML and XML Document Outline window


 AutoComplete
 Color-coding
 Data View for manipulating data
Recording and Using Macros

 You can use macros for


repetitive tasks such as
inserting comments
 Macro Explorer provides
macro navigation
 The IDE provides samples:
 Toggle line numbering
 Saving/loading Window
Views
 Debugging macros
 To record new macros, go to
the Tools/Macros menu
Demonstration: Using the Visual Studio .NET IDE
 Debugging Applications

 Setting Breakpoints
 Debugging Code
 Using the Command Window
Setting Breakpoints

 Set breakpoints to halt code execution at a specific line


 Use the Breakpoint Properties dialog box to
set conditions
Debugging Code

 Use the Debug menu or toolbar to step through code


 Use the debugging windows:
 Locals: to view and modify local variables
 Output: to view output from the compiler
 Watch: to view watch expressions
 Call Stack: to view call history, including parameter
information
 Breakpoints: to view, add, or temporarily disable
breakpoints
Using the Command Window

 Immediate mode
 Similar to the Immediate
window
 Command mode
 Use Visual Studio IDE
features
 Switching modes
 Use >cmd to change to
Command mode
 Use immed to return to
Immediate mode
Demonstration: Debugging a Project
 Compiling in Visual Basic .NET

 Locating Syntax Errors


 Compilation Options
Locating Syntax Errors

 The Task List displays compilation errors


 Displays error description, file, and line number
 Double-click the entry to view the error
Compilation Options

 Build configurations
 Debug – provides debug information
 Release – optimizes code and executable size
 Build options
 Build – only builds changed projects
 Rebuild – rebuilds project regardless of changes
Lab 2.1: Exploring the Development Environment
Review

 Describing the Integrated Development Environment


 Creating Visual Basic .NET Projects
 Using Development Environment Features
 Debugging Applications
 Compiling in Visual Basic .NET

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy