Table of Contents

Part I Learning the Basics of VB

1 Introducing the .NET Framework 4.5

What Is the .NET Framework?

Where Is the .NET Framework?

The .NET Framework Architecture

Differences Between .NET 4.0 and .NET 4.5

The Common Language Runtime

Writing Managed Code

.NET Assemblies

The Base Class Library

Programming Languages Included in .NET 4.5

Additional Tools Shipping with the .NET Framework

Windows Software Development Kit

What’s New in .NET Framework 4.5

How .NET Meets Windows 8 and the Windows Runtime

Summary

2 Getting Started with the Visual Studio 2012 IDE

What’s New in Visual Studio 2012

Status Bar and Start Page

Get Started Tab

The Latest News Tab

Working with Projects and Solutions

Creating Visual Basic Projects

Multi-targeting

Accessing Recent and Online Templates

Searching for Installed Templates

Finding Code Samples on the Internet

Creating Reusable Projects and Items Templates

Creating Your First Visual Basic 2012 Project

Finding Visual Basic Projects

Working with the Code Editor

Working with Tool Windows

The Solution Explorer Window

The Error List Window

The Properties Window

The Output Window

My Project

Application Tab

Compiling Projects

Debug and Release Configurations

Other Compile Options

Advanced Compile Options

Debugging Overview

Debugging an Application

Breakpoints and Data Tips

Runtime Errors

Edit and Continue

Browsing the Visual Basic and .NET Documentation

Online Help and the MSDN Library

Object Browser Window

Quick Launch Tool

Showing the Hierarchy of Method Calls

Summary

3 The Anatomy of a Visual Basic Project

Brief Overview of Types and Members

Classes

Properties

Methods

Modules

Structures

Inheritance

Namespaces

Accessing Members

Imports Directives

Region Directives

Attributes

Implicit Line Continuation

Visual Basic 2012 Reserved Keywords

Understanding Project Files

Dissecting My Project

Application.MyApp

AssemblyInfo.vb

Resources and the Resources.resx File

Application Settings

Understanding References

Adding References to COM Libraries

Deploy Without PIAs

Final Considerations

Summary

4 Data Types and Expressions

Introducing the Common Type System

Everything Is an Object

Introducing Value Types and Reference Types

System.Object and System.ValueType

Understanding Value Types

.NET Framework Primitive Value Types

Using Value Types

Working with BigInteger

Building Custom Value Types

Understanding Reference Types

.NET Framework Primitive Reference Types

Differences Between Value Types and Reference Types

Memory Allocation

Object-Oriented Differences

Performance Differences

What Custom Type Should I Choose?

Converting Between Value Types and Reference Types

Understanding Implicit Conversions

Boxing and Unboxing

Deep Copy and Shallow Copy

The GetType Keyword

Understanding Conversion Operators

Widening and Narrowing Conversions

Working with .NET Fundamental Types

Working with Strings

Working with Dates

Working with Time

Working with TimeZone and TimeZoneInfo

Working with GUIDs

Working with Arrays

Common Operators

Arithmetic Operators

Assignment Operators

Logical, Bitwise, and Shift Operators

Concatenation Operators

Comparison Operators

Iterations, Loops, and Conditional Code Blocks

Iterations

Loops

Conditional Code Blocks

Constants

With..End With Statement

Summary

5 Debugging Visual Basic 2012 Applications

Preparing an Example

Debugging Instrumentation

Debugging in Steps

Mixed Mode Debugging

“Just My Code” Debugging

Working with Breakpoints and Trace Points

Locals Window

Command Window

Call Stack Window

Watch Windows

Threads Window

Autos Window

Inspecting Object Details with Debugger Visualizers

Debugging in Code

The Debug Class

The Trace Class

Understanding Trace Listeners

Using Debug Attributes in Your Code

Summary

6 Handling Errors and Exceptions

Introducing Exceptions

Handling Exceptions

Tips for Visual Basic 6 Migration

System.Exception, Naming Conventions, and Specialization

Handling Exceptions with Try..Catch..Finally Blocks

The Throw Keyword

Catching Exceptions Without a Variable

Summary

Part II Object-Oriented Programming with Visual Basic 2012

7 Class Fundamentals

Declaring Classes

Nested Classes

Fields

Avoiding Ambiguities with Local Variables

Properties

Read-Only Properties

Write-Only Properties

Exposing Custom Types

Accessing Properties

Default Properties

Types and Members Visibility: Scope

Executing Actions with Methods

Invoking Methods

Methods Arguments: ByVal and ByRef

Overloading Methods

Exit from Methods

Partial Classes

Partial Methods

Constructors

Overloading Constructors

Object Initializers

Shared Members

Shared Classes

Shared Fields

Shared Properties

Shared Methods

Shared Constructors

Common Language Specification

Where Do I Need to Apply?

Marking Assemblies and Types as CLS-Compliant

Naming Conventions

Rules About Classes

Rules About Properties

Rules About Methods

Rules About Arrays

Summary

8 Managing an Object’s Lifetime

Understanding Memory Allocation

Understanding Garbage Collection

Understanding the Finalize Method

Understanding Dispose and the IDisposable Interface

Using..End Using Statement

Putting Dispose and Finalize Together

Restoring Objects with Object Resurrection

Advanced Garbage Collection

Interacting with the Garbage Collector

Understanding Generations and Operation Modes

Summary

9 Organizing Types Within Namespaces

Understanding Namespaces

Organizing Types Within Namespaces

Why Are Namespaces So Useful?

Nested Namespaces

Scope

Root Namespace

Imports Directives

Namespaces and Common Language Specification

Global Namespaces and the Global Keyword

Summary

10 Modules

Modules Overview

Scope

Differences Between Modules and Classes

No Constructor

No Inheritance Support

No Interface Implementation

Summary

11 Structures and Enumerations

Understanding Structures

Assigning Structures to Variables

Passing Structures to Methods

Members’ Visibility

Inheritance Limitations and Interface Implementation

Memory Allocation

Organizing Structures

Overloading Operators

Overloading CType

Structures and Common Language Specification

Enumerations

Using Enumerations

Useful Methods from System.Enum

Using Enums As Return Values from Methods

Enum Values As Bit Flags

Enumerations and Common Language Specification

Summary

12 Inheritance

Applying Inheritance

Illustrating System.Object in Detail

Introducing Polymorphism

Overriding Members

NotOverridable Keyword

Overloading Derived Members

Conditioning Inheritance

NotInheritable Keyword

MustInherit and MustOverride Keywords

Accessing Base Classes Members

MyBase Keyword

MyClass Keyword

Constructors’ Inheritance

Shadowing

Overriding Shared Members

Practical Inheritance: Building Custom Exceptions

Summary

13 Interfaces

Defining Interfaces

Implementing and Accessing Interfaces

Passing Interfaces as Method Arguments

Interfaces and Polymorphism

Interfaces Inheritance

Defining CLS-Compliant Interfaces

Most Common .NET Interfaces

The IEnumerable Interface

The IComparable Interface

The IConvertible Interface

The IFormattable Interface

Summary

14 Generics and Nullable Types

Introducing Generics

Creating and Consuming Generics

Consuming Generic Types

Implementing Generic Methods

Understanding Constraints

Overloading Type Parameters

Introducing Nullable Types

Summary

15 Delegates and Events

Understanding Delegates

Declaring Delegates

Combining Delegates: Multicast Delegates

Handling Events

Registering for Events: AddHandler and RemoveHandler

Declaring Objects with the WithEvents Keyword

Offering Events to the External World

Raising Events

Creating Custom Events

Summary

16 Working with Collections and Iterators

Understanding Collections Architecture

Working with Nongeneric Collections

The ArrayList Collection

The Queue Collection

The Stack Collection

The HashTable Collection

The ListDictionary Collection

The OrderedDictionary Collection

The SortedList Collection

The HybridDictionary Collection

The StringCollection Collection

The StringDictionary Collection

The NameValueCollection Collection

The BitArray Collection

The Bitvector32 Collection

Working with Generic Collections

The List(Of T) Collection

Working with Collection Initializers

The ReadOnlyCollection(Of T) Collection

The Dictionary(Of TKey, TValue) Collection

The SortedDictionary(Of TKey, TValue) Collection

The ObservableCollection(Of T) Collection

The ReadonlyObservableCollection(Of T) Collection

The LinkedList(Of T) Collection

The Queue(Of T) and Stack(Of T) Collections

Building Custom Collections

Concurrent Collections

Iterators in Visual Basic

Understanding the Benefits of Iterators in Code

Simple Iterators

Exiting from Iterators

Iterators with Try..Catch..Finally

Anonymous Iterators

Implementing an Iterator Class

Summary

17 Creating Objects: Visual Tools and Portable Libraries

Visual Studio Class Designer

Enabling the Class Designer

Adding and Designing Objects

Implementing Derived Classes

Creating Multiple Diagrams

Exporting the Diagram

Class View Window

Generate from Usage

Generating Shared Members

On-the-Fly Code and Object Initializers

Generating Complex Objects

Creating Portable Classes

Creating a Sample Portable Library

Summary

Part III Advanced Language Features

18 Manipulating Files and Streams

Manipulating Directories and Pathnames

The System.IO.Path Class

The System.IO.Directory Class

The System.IO.DirectoryInfo Class

The System.IO.DriveInfo Class

Handling Exceptions for Directories and Pathnames

Manipulating Files

The System.IO.File Class

The System.IO.FileInfo Class

Handling File Exceptions

Understanding Permissions

Introducing Streams

Reading and Writing Text Files

Reading and Writing Binary Files

Using Memory Streams

Using Streams with Strings

Compressing Data with Streams

Networking with Streams

Summary

19 The My Namespace

Introducing the My Namespace

My.Application

Retrieving Assembly Information

Working with Cultures

Deployment and Environment Information

My.Computer

Working with the File System

Working with the Clipboard

Playing Audio Files

Managing the Keyboard

Working with the Registry

Accessing the Network

Getting Computer Information

My.Settings

My.Settings Events

My.Resources

Getting Resources by Name in Code

My.User

My.WebServices

Extending My

Extending My.Application and My.Computer

Extending My.Resources and My.Settings

My in Different Applications

Understanding Application Events

Summary

20 Advanced Language Features

Local Type Inference

Option Infer Directive

Local Type Inference Scope

Array Literals

Bug Fix: Return Type in Array Literals

Multidimensional and Jagged Arrays

Extension Methods

Coding Custom Extension Methods

Exporting Extension Methods

Anonymous Types

Relaxed Delegates

Lambda Expressions

Type Inference and Lambda Expressions

Multiline Lambdas

Sub Lambdas

Lexical Closures

Ternary If Operator

Generic Variance

Covariance

Contra Variance

Summary

Part IV Data Access with ADO.NET and LINQ

21 Introducing ADO.NET and DataSets

System Requirements

Introducing ADO.NET

Data Providers

Connection Modes

Understanding Connections and Data Readers

Introducing DataSets

Creating DataSets

Summary

22 Introducing LINQ

What Is LINQ?

LINQ Examples

Language Support

Understanding Providers

Overview of LINQ Architecture

Summary

23 LINQ to Objects

Introducing LINQ to Objects

Querying in Memory Objects

Understanding Deferred Execution

Introducing Standard Query Operators

Projection Operators

Restriction Operators

Aggregation Operators

Understanding the Let Keyword

Conversion Operators

Generation Operators

Ordering Operators

Set Operators

Grouping Operators

Union Operators

Equality Operators

Quantifiers

Concatenation Operators

Elements Operators

Partitioning Operators

Summary

24 LINQ to SQL

Introducing LINQ to SQL

Prerequisites and Requirements for This Book

Understanding LINQ to SQL Classes

Behind the Scenes of LINQ to SQL Classes

Querying Data with LINQ to SQL

Insert/Update/Delete Operations with LINQ

Inserting Entities

Updating Entities

Deleting Entities

Mapping Stored Procedures

Using the Log

Advanced LINQ to SQL

Custom Validations

Handling Optimistic Concurrency

Using SQL Syntax Against Entities

LINQ to SQL with SQL Server Compact Edition 3.5

Writing the Connection String

Summary

25 LINQ to DataSets

Querying Datasets with LINQ

Building Complex Queries with Anonymous Types

LINQ to DataSets’ Extension Methods

Understanding CopyToDataTable

Understanding Field(Of T) and SetField(Of T)

Summary

26 Introducing ADO.NET Entity Framework

Introducing Entity Framework

Understanding Entity Data Models

Understanding the DbContext Class: The Visual Basic Mapping

Entity Designer Tool Windows

Insert/Update/Delete Operations for Entities

Instantiating the DbContext

Adding Entities

Deleting Entities

Updating Entities

Handling Optimistic Concurrency

Validating Data

Querying EDMs with LINQ to Entities

Querying EDMs with Entity SQL

Mapping Stored Procedures

Introducing the Code First Approach

Downloading Additions to the Entity Framework 5

Coding Your Model

Generating the Database and Executing Data Operations

Introducing Data Annotations

Introducing the Fluent APIs

Compatibility with the Past and with Other Technologies

Summary

27 Manipulating XML Documents with LINQ and XML Literals

Introducing LINQ to XML

The System.Xml.Linq Namespace

Writing XML Markup in VB with XML Literals

LINQ Queries with XML Literals

Understanding Embedded Expressions

XML Schema Inference

Summary

Part V Building Windows Desktop Applications

28 Creating WPF Applications

What Is WPF?

Improvements in WPF 4.5

WPF and Windows 8: The Future of Desktop Development

Introducing the WPF Architecture

Building WPF Applications with Visual Studio 2012

Understanding the eXtensible Application Markup Language

Declaring and Using Controls with the Designer and XAML

Understanding Visual Tree and Logical Tree

Handling Events in WPF

A More Thorough Discussion: Introducing the Routed Events

Arranging Controls with Panels

The Grid Panel

The StackPanel Panel

The WrapPanel Panel

The Canvas Panel

The DockPanel Panel

The ViewBox Panel

Managing Windows

Instantiating Windows at Runtime

Introducing the Application Object

Brief Overview of WPF Browser Applications

Summary

29 WPF Common Controls

Introducing WPF Controls Features

Understanding the ContentControl

Understanding Common Controls

The Border Control

The Button Control

Showing Dates with the Calendar Control

Items Selection with the CheckBox Control

Selecting Values from a List with the ComboBox Control

Presenting Tabular Data with the DataGrid Control

Selecting Dates with the DatePicker Control

Viewing XPS Documents with the DocumentViewer Control

Drawing Shapes: The Ellipse

Organizing Controls with the Expander

Frame

Organizing Controls with the GroupBox Control

Displaying Images with the Image Control

Displaying Text Messages with the Label Control

Presenting Data with the ListBox Control

Presenting Data with the ListView Control

Playing Audio and Video with the MediaElement Control

Building Effective User Interfaces with the Menu Control

Entering Passwords with the PasswordBox Control

Showing the Progress of an Operation with the ProgressBar Control

Accepting User Choices with the RadioButton Control

Drawing Shapes: The Rectangle

Editing Text with the RichTextBox Control

Extended View with the ScrollBar Control

Scrolling the Visual Tree with the ScrollViewer Control

Separating Visual Elements with the Separator Control

Value Selection with the Slider Control

Displaying Information with the StatusBar Control

Organizing User Interfaces with the TabControl Control

Presenting Text with the TextBlock Control

Entering Text with the TextBox Control

Offering Commands with the ToolBar Control

Presenting Hierarchical Data with the TreeView Control

Accessing the Web with the WebBrowser Control

Windows Forms Interoperability with the WindowsFormsHost Control

Using Common Dialogs

Summary

30 Brushes, Styles, Templates, and Animations in WPF

Introducing Brushes

Applying a SolidColorBrush

Applying a LinearGradientBrush

Applying a RadialGradientBrush

Applying an ImageBrush

Applying SelectionBrush and CaretBrush

Applying a VisualBrush

Applying a DrawingBrush

Applying a BitmapCacheBrush

Introducing Styles

Styles Inheritance

Understanding Triggers

Introducing Control Templates

Introducing Transformations

Rotating Visual Elements with RotateTransform

Dynamically Resizing Visual Elements with ScaleTransform

Changing Visual Elements’ Angles with SkewTransform

Dynamically Moving Visual Elements with TranslateTransform

Applying Multiple Transforms

Introducing Animations

Applying DoubleAnimation

Applying ColorAnimation

Working with Animation Events

Creating Animations with Visual Basic

Summary

31 Manipulating Media and Documents

Viewing Images

Playing Media

Manipulating Documents

Understanding the RichTextBox Control

Viewing XPS Documents

Summary

32 Introducing Data-Binding

Introducing the Data-Binding in WPF

Binding UI Elements with the Binding Markup Extension

Understanding the DataGrid and the ObservableCollection

Discussing the Drag’n’Drop Data-Binding

Creating Tabular Data Forms

Creating Master-Details Forms

Understanding Views and Binding Lists

Implementing String Formatters and Value Converters

Summary

33 Localizing Applications

Introducing .NET Localization

Windows Forms Localization

WPF Localization

Preparing the LocBaml Tool

Localizing a WPF Application

Summary

Part VI Building Web Applications

34 Building ASP.NET Web Applications

Introducing the ASP.NET Model

Understanding Page Requests

Scalability and Performance

Available Project Templates

Web Forms and Master Pages

Web Forms

ASP.NET Controls

Server Controls

HTML Controls

Handling Events

Understanding State Management

The Application State

The Cache State

The Context State

Using Cookies for Saving Information

The Session State

The ViewState State

Creating a Web Application with VB 2012 with Navigation and Data-Binding

Master Pages

Adding the Data Model

Adding a New Web Form

Adding Data Controls

Adding Filtering Capabilities

Adding Navigation Controls

Running the Application

New in ASP.NET 4.5: Strongly Typed Data Controls and Model Binding

Configuring a Web Application for Security

Summary

35 Publishing ASP.NET Web Applications

Deployment Overview

The 1-Click Deployment

Classic Publishing

MSDeploy Publish

Understanding Packages

Web Deploy with MSDeploy

Packaging Web Applications for Manual Installation

Summary

36 Building Rich Internet Applications with Silverlight 5

Introducing Silverlight

Creating Silverlight Projects with Visual Basic 2012

Adding Controls and Handling Events

How Silverlight Applications Are Packaged

Playing Media

Animating UI Elements

Introducing Navigation Applications

Introducing WCF RIA Services

Adding the Data Source

Adding the Domain Service Class

Data-Binding to Controls

Running the Application

Filtering Data with the PivotViewer Control

“Out-of-Browser” Applications

Elevated Permissions and Security Considerations

XAML Debugging

Additional New Features in Silverlight 5

Summary

37 Building and Deploying Applications for Windows Azure

Overview of the Windows Azure Platform

Registering for the Windows Azure Developer Portal

Downloading and Installing Tools for Visual Studio

Additional Tools

Creating a Demo Project

Understanding Web Roles and Web Configuration

Building the Silverlight 5 Project

Testing the Application Locally

Deploying Applications to Windows Azure

Introducing the Windows Azure Management Portal

Summary

38 Building Apps for Windows Phone 7.5

Introducing Windows Phone

Developer Registration to the Windows Phone Marketplace

Downloading the Developer Tools

Training and Learning Resources

The Windows Phone 7.5 Programming Model

Creating Apps with Visual Basic

Starting and Debugging Windows Phone Apps

Understanding Pages, Orientations, and the Navigation Framework

Using System Functionalities with Launchers

Showing Multiple Contents with the Panorama Control

Local Data Storage

Understanding the Application Bar

Accessing the Pictures Hub

Understanding the Execution Model

Setting Properties, Icons, and Splash Screen

Submitting Apps to the Marketplace

Summary

Part VII Networking and Exposing Data Through Networks

39 Creating and Consuming WCF Services

Introducing Windows Communication Foundation

Understanding Endpoints

Address, Binding, Contract: The ABC of WCF

Implementing WCF Services

Implementing Custom Logic for the WCF Service

Consuming WCF Services

Creating the Client and Adding a Service Reference

Understanding the Proxy Class

Invoking Members from the Service

Handling Exceptions in WCF

Hosting WCF Services in Internet Information Services

Configuring Services with the Configuration Editor

Summary

40 Implementing and Consuming WCF Data Services

What Are Data Services?

Querying Data via HTTP Requests

Open Data Protocol for WCF Data Services

Implementing WCF Data Services

Deploying WCF Data Services to Internet Information Services

Consuming WCF Data Services

Creating a Client Application

Querying Data

Implementing Service Operations

Implementing Query Interceptors

Understanding Query Interceptors

Understanding Change Interceptors

Understanding Server-Driven Paging

Summary

Part VIII Advanced .NET Framework with VB 2012

41 Serialization

Objects Serialization

Binary Serialization

SOAP Serialization

Providing Serialization for Custom Objects

NonSerialized Events

XML Serialization

Customizing XML Serialization

Custom Serialization

Serialization Events

Serialization with XAML

Serialization in Windows Communication Foundation

JSON Serialization

Serialization in the ADO.NET Entity Framework

Summary

42 Processes and Multithreading

Managing Processes

Querying Existing Processes

Introducing Multithreading

Creating Threads

Passing Parameters

Understanding the .NET Thread Pool

Getting and Setting Information in the Thread Pool

Threads Synchronization

The SyncLock..End SyncLock Statement

Synchronization with the Monitor Class

Read/Write Locks

Summary

43 Parallel Programming and Parallel LINQ

Introducing Parallel Computing

What’s New in .NET 4.5: Custom Task Scheduling

Introducing Parallel Classes

Understanding and Using Tasks

What Is a Task?

Running Tasks with Parallel.Invoke

Creating, Running, and Managing Tasks: The Task Class

Creating Tasks That Return Values

Exception Handling

Canceling Tasks

The Barrier Class

Parallel Loops

Parallel.For Loop

Parallel.ForEach Loop

Debugging Tools for Parallel Tasks

Concurrent Collections

ConcurrentBag(Of T)

ConcurrentQueue(Of T)

ConcurrentStack(Of T)

ConcurrentDictionary(Of TKey, TValue)

BlockingCollection(Of T)

Introducing Parallel LINQ

Simulating an Intensive Work

Measuring Performances of a Classic LINQ Query

Measuring Performances of a PLINQ Query

Ordering Sequences

AsParallel and Binary Operators

Using ParallelEnumerable

Controlling PLINQ Queries

Handling Exceptions

Summary

44 Asynchronous Programming

Overview of Asynchrony

Before .NET 4.5: Event-based Asynchrony

Before .NET 4.5: The Asynchronous Programming Model

.NET 4.5: Introducing the Async Pattern

Where Do I Use Async?

When and Why to Use Async/Await and Comparisons with the TPL

Getting Started with Async/Await

The Synchronous Approach

Event-based Asynchrony and Callbacks

Asynchrony with Async/Await

How Async and Await Work Behind the Scenes

Documentation and Examples of the Async Pattern

Exception Handling in Async

Implementing Task-based Asynchrony

Switching Threads

Using Combinators

Cancellation and Progress

Implementing Cancellation

Reporting Progress

Asynchronous Lambda Expressions

Asynchronous I/O File Operations in .NET 4.5

Summary

45 Working with Assemblies

Assembly Overview

Information Stored Within Assemblies

Assembly Location

Signing Assemblies

Assembly Information and Attributes

Understanding Application Domains

Creating Application Domains and Executing Assemblies

Security Model in .NET 4.5

Implementing and Requiring Permissions

The Transparency Level 2

Sandboxing

Conditional APTCA

Migrating from Old CAS-Based Code

Summary

46 Reflection

Introducing Reflection

Understanding Assemblies’ Metadata

Preparing a Sample Assembly

Getting Assembly Information

Reflecting Types

Reflecting a Single Type

Invoking Code Dynamically

Generating Code at Runtime with Reflection.Emit

Late Binding Concepts

Caller Information

Summary

47 Coding Attributes

Applying Attributes

Coding Custom Attributes

Applying Custom Attributes

Applying Attributes Multiple Times

Defining Inheritance

Reflecting Attributes

Summary

48 Platform Invokes and Interoperability with the COM Architecture

Importing and Using COM Objects

Importing COM Components into Visual Studio

Using COM Objects in Code

Catching Exceptions

Releasing COM Objects

Calling COM Objects from WPF

Exposing .NET Objects to the COM World

P/Invokes and Unmanaged Code

Understanding P/Invokes

Encapsulating P/Invokes

Converting Types to Unmanaged

The StructLayout Attribute

The VBFixedString Attribute

Handling Exceptions

References to the Win32 API Calls

Summary

49 Documenting the Source Code with XML Comments

Understanding XML Comments

Enabling XML Comments

Implementing XML Comments

Defining Complex Code Documentation

Generating Compiled Help Files

Summary

Part IX Applications Deployment

50 Understanding the Global Assembly Cache

The Dll Hell Problem

XCopy Deployment

The Global Assembly Cache

Installing and Uninstalling Assemblies

Signing Assemblies with Strong Names

Top Reasons for Installing (or Not) Assemblies to the GAC

Summary

51 Setup and Deployment Projects with InstallShield for Visual Studio

Windows Installer Overview

Introducing InstallShield

Obtaining Your Copy of InstallShield LE

Creating a Setup Project

Application Information

Installation Requirements

Application Files

Application Shortcuts

Application Registry

Installation Interview

Specifying Environment Variables

Configuring the Setup Project

Building and Deploying the Windows Installer Package

Summary

52 Deploying Applications with ClickOnce

Introducing ClickOnce

How ClickOnce Handles Applications

When to Use ClickOnce

Deploying Applications with ClickOnce

Understanding the Structure of a ClickOnce Deployment

Configuring ClickOnce

Application Files

Prerequisites

Publishing Application Updates

Options

Security Considerations

Providing Certificates

Programmatically Accessing ClickOnce

Registration-Free COM

Summary

Part X Mastering the Visual Studio 2012 IDE

53 Advanced IDE Features

Exporting Templates

Exporting Project Templates

Exporting Item Templates

Customizing Visual Studio 2012

Customizing the Tools Menu

Customizing Commands and Toolbars

Managing User Settings

Exporting Settings

Importing Settings

Customizing the Toolbox

Using, Creating, and Managing Reusable Code Snippets

Consuming Code Snippets

The Code Snippet Manager

Creating and Consuming Custom Code Snippets

Managing Libraries with NuGet

Summary

54 Introducing Visual Studio Extensibility

Introducing Visual Studio Extensibility

About Extensibility with Visual Studio 2012

The Visual Studio 2012 SDK

Building a Visual Studio Package

Deploying Visual Studio Extensions

Managing Extensions with Extensions and Updates

Managing Add-Ins with the Add-In Manager

Extending the Code Editor

Summary

55 Advanced Analysis Tools

Introducing Analysis Tools

Performing Code Analysis

Calculating Code Metrics

Code Clone Detection

Profiling Applications

Profiling External Executables

Historical Debugging with IntelliTrace

IntelliTrace Options

Creating a Sample Application

Tracking Application Events and Exceptions with IntelliTrace

Analyzing IntelliTrace Logs

Using IntelliTrace for Unit Tests

Generating Dependency Graphs

Summary

56 Testing Code with Unit Tests, Test-Driven Development, and Code Contracts

Testing Code with Unit Tests

Creating Unit Tests

Running Unit Tests

Enabling Code Coverage

Introducing Test Driven Development

Creating a Test Project

Creating Unit Tests

Refactoring Code

Understanding Code Contracts

Setting Up the Environment

Setting Contracts Properties

Tools for Code Contracts

Understanding Preconditions

Post-Conditions

Invariants

Assertions and Assumptions

Contract Events

Summary

Appendix

A Useful Resources and Tools for Visual Basic 2012

Visual Basic Resources in MSDN

Useful Developer Tools for Visual Basic

Coding Tools

Networking

Data Access

Diagnostics and Performance

Miscellaneous

Where Do I Find Additional Tools?

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.212.102