Professional Visual Studio 2013 - Bruce Johnson - E-Book

Professional Visual Studio 2013 E-Book

Bruce Johnson

0,0
38,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Comprehensive guide to Visual Studio 2013 Visual Studio is your essential tool for Windows programming. Visual Studio 2013 features important updates to the user interface and to productivity. In Professional Visual Studio 2013, author, Microsoft Certified Trainer, and Microsoft Visual C# MVP Bruce Johnson brings three decades of industry experience to guide you through the update, and he doesn't just gloss over the basics. With his unique IDE-centric approach, he steers into the nooks and crannies to help you use Visual Studio 2013 to its maximum potential. * Choose from more theme options, check out the new icons, and make your settings portable * Step up your workflow with hover colors, auto brace completion, peek, and CodeLens * Code ASP.NET faster than ever with new shortcuts * Get acquainted with the new SharePoint 2013 environment * Find your way around the new XAML editor for Windows Store apps Visual Studio 2013 includes better support for advanced debugging techniques, vast improvements to the visual database tools, and new support for UI testing for Windows Store apps. This update is the key to smoother, quicker programming, and Professional Visual Studio 2013 is your map to everything inside.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1686

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Contents

Introduction

Part I: Integrated Development Environment

Chapter 1: A Quick Tour

Getting Started

The Visual Studio IDE

Summary

Chapter 2: The Solution Explorer, Toolbox, and Properties

The Solution Explorer

The Toolbox

Properties

Summary

Chapter 3: Options and Customizations

The Start Page

Window Layout

The Editor Space

Other Options

Importing and Exporting Settings

Summary

Chapter 4: The Visual Studio Workspace

The Code Editor

Code Navigation

The Command Window

The Immediate Window

The Class View

The Error List

The Object Browser

The Code Definition Window

The Call Hierarchy Window

The Document Outline Tool Window

Reorganizing Tool Windows

Summary

Chapter 5: Find and Replace and Help

Quick Find/Replace

Find/Replace in Files

Accessing Help

Summary

Part II: Getting Started

Chapter 6: Solutions, Projects, and Items

Solution Structure

Solution File Format

Solution Properties

Project Types

Project Files Format

Project Properties

Web Application Project Properties

Web Site Projects

Summary

Chapter 7: IntelliSense and Bookmarks

IntelliSense Explained

JavaScript IntelliSense

XAML IntelliSense

IntelliSense Options

Extended IntelliSense

Bookmarks and the Bookmark Window

Summary

Chapter 8: Code Snippets and Refactoring

Code Snippets Revealed

Accessing Refactoring Support

Refactoring Actions

Summary

Chapter 9: Server Explorer

Server Connections

Data Connections

SharePoint Connections

Summary

Chapter 10: Modeling with the Class Designer

Creating a Class Diagram

The Design Surface

The Toolbox

The Class Details

The Properties Window

Layout

Exporting Diagrams

Code Generation and Refactoring

Summary

Part III: Digging Deeper

Chapter 11: Unit Testing

Your First Test Case

Asserting the Facts

Initializing and Cleaning Up

Testing Context

Advanced Unit Testing

Testing Code Contracts

Summary

Chapter 12: Documentation with XML Comments

Inline Commenting

XML Comments

Using XML Comments

Generating Documentation with GhostDoc

Compiling Documentation with Sandcastle

Task List Comments

Summary

Chapter 13: Code Consistency Tools

Source Control

Coding Standards

Summary

Chapter 14: Code Generation with T4

Creating a T4 Template

T4 Building Blocks

How T4 Works

T4 Directives

Troubleshooting

Generating Code Assets

Runtime Text Templates

Tips and Tricks

Summary

Chapter 15: Project and Item Templates

Creating Templates

Extending Templates

Starter Kits

Online Templates

Summary

Chapter 16: Language-Specific Features

Hitting a Nail with the Right Hammer

A Tale of Two Languages

Visual Basic

F#

Summary

Part IV: Rich Client Applications

Chapter 17: Windows Forms Applications

Getting Started

The Windows Form

Form Design Preferences

Adding and Positioning Controls

Container Controls

Docking and Anchoring Controls

Summary

Chapter 18: Windows Presentation Foundation (WPF)

What Is WPF?

Getting Started with WPF

The WPF Designer and XAML Editor

Styling Your Application

Windows Forms Interoperability

Debugging with the WPF Visualizer

Summary

Chapter 19: Office Business Applications

Choosing an Office Project Type

Creating a Document-Level Customization

Creating an Application Add-In

Debugging Office Applications

Deploying Office Applications

Summary

Chapter 20: Windows Store Applications

What Is a Windows Store Application?

Creating a Windows Store Application

Summary

Part V: Web Applications

Chapter 21: ASP.NET Web Forms

Web Application Versus Web Site Projects

Creating Web Projects

Designing Web Forms

Web Controls

Master Pages

Rich Client-Side Development

Summary

Chapter 22: ASP.NET MVC

Model View Controller

Getting Started with ASP.NET MVC

Choosing a Model

Controllers and Action Methods

Rendering a UI with Views

Advanced MVC

Summary

Chapter 23: Silverlight

What Is Silverlight?

Getting Started with Silverlight

Navigation Framework

Theming

Enabling Running Out of Browser

Summary

Chapter 24: Dynamic Data

Creating a Dynamic Data Web Application

Customizing the Data Model

Customizing the Presentation

Enabling Dynamic Data for Existing Projects

Summary

Chapter 25: SharePoint

SharePoint Execution Models

Preparing the Development Environment

Exploring SharePoint 2013

Creating a SharePoint Project

Building Custom SharePoint Components

Working with Features

Packaging and Deployment

Summary

Chapter 26: Windows Azure

The Windows Azure Platform

SQL Azure

AppFabric

Azure Websites

Azure Virtual Machines

Summary

Part VI: Data

Chapter 27: Visual Database Tools

Database Windows in Visual Studio 2013

Editing Data

Summary

Chapter 28: DataSets and DataBinding

DataSets Overview

Binding Data

Working with Data Sources

Summary

Chapter 29: Language Integrated Queries (LINQ)

LINQ Providers

Old-School Queries

Query Pieces

Debugging and Execution

LINQ to XML

Querying XML

Schema Support

LINQ to SQL

LINQPad

Summary

Chapter 30: The ADO.NET Entity Framework

What Is the Entity Framework?

Getting Started

Creating an Entity Model

Querying the Entity Model

Advanced Functionality

Summary

Chapter 31: Reporting

Getting Started with Reporting

Designing Reports

Rendering Reports

Deploying Reports

Summary

Part VII: Application Services

Chapter 32: Windows Communication Foundation (WCF)

What Is WCF?

Getting Started

Defining Contracts

Configuring WCF Service Endpoints

Hosting WCF Services

Consuming a WCF Service

Summary

Chapter 33: Windows Workflow Foundation (WF)

What Is Windows Workflow Foundation?

Why Use Windows Workflow?

Workflow Concepts

GETTING STARTED

The Workflow Foundation Designer

Creating a Workflow

Hosting the Workflow Designer

SUMMARY

Chapter 34: Client Application Services

Client Services

Role Authorization

User Authentication

Settings

Login Form

Offline Support

Summary

Chapter 35: Synchronization Services

Occasionally Connected Applications

Server Direct

Getting Started with Synchronization Services

Synchronization Services over N-Tiers

Summary

Chapter 36: WCF RIA Services

Getting Started

Domain Services

Domain Operations

Consuming a Domain Service in Silverlight

Summary

Part VIII: Configuration and Resources

Chapter 37: Configuration Files

.Config Files

Configuration Schema

Application Settings

User Settings

Referenced Projects with Settings

Summary

Chapter 38: Connection Strings

Connection String Wizard

SQL Server Format

In-Code Construction

Encrypting Connection Strings

LocalDB

Summary

Chapter 39: Resource Files

What Are Resources?

Resourcing Your Application

Satellite Resources

Accessing Specifics

Coding Resource Files

Custom Resources

Summary

Part IX: Debugging

Chapter 40: Using the Debugging Windows

The Code Window

The Breakpoints Window

The Output Window

The Immediate Window

The Watch Windows

The Code Execution Windows

The Memory Windows

IntelliTrace (Ultimate Edition Only)

The Parallel Debugging Windows

Exceptions

Summary

Chapter 41: Debugging with Breakpoints

Breakpoints

Tracepoints

Execution Control

Edit and Continue

Summary

Chapter 42: DataTips, Debug Proxies, and Visualizers

DataTips

Debugger Attributes

Type Proxies

Visualizers

Advanced Techniques

Summary

Chapter 43: Debugging Web Applications

Debugging Server-Side ASP.NET Code

Debugging Client-Side JavaScript

Tracing

Health Monitoring

Summary

Chapter 44: Advanced Debugging Techniques

Start Actions

Debugging with Code

Debugging Running Applications

.NET Framework Source

Multithreaded and Parallelized Application Debugging

Debugging SQL Server Stored Procedures

Mixed-Mode Debugging

Post-Mortem Debugging

Summary

Part X: Build and Deployment

Chapter 45: Upgrading with Visual Studio 2013

Upgrading from Visual Studio 2012 or 2010

Upgrading to .NET Framework 4.5.1

Summary

Chapter 46: Build Customization

General Build Options

Manual Dependencies

The Visual Basic Compile Page

C# Build Pages

MSBuild

Summary

Chapter 47: Assembly Versioning and Signing

Assembly Naming

Version Consistency

Strongly Named Assemblies

The Global Assembly Cache

Signing an Assembly

Summary

Chapter 48: Obfuscation, Application Monitoring, and Management

The MSIL Disassembler

Decompilers

Obfuscating Your Code

Application Monitoring and Management

Summary

Chapter 49: Packaging and Deployment

Windows INSTALLER XML TOOLSET

ClickOnce

Summary

Chapter 50: Web Application Deployment

Web Deployment

Web Project Installers

The Web Platform Installer

Summary

Part XI: Customizing and Extending Visual Studio

Chapter 51: The Automation Model

Visual Studio Extensibility Options

The Visual Studio Automation Model

Summary

Chapter 52: Add-Ins

Developing an Add-in

Deploying Add-ins

Summary

Chapter 53: Managed Extensibility Framework (MEF)

Getting Started with MEF

The Visual Studio Editor

Extending the Editor

Summary

Part XII: Visual Studio Ultimate

Chapter 54: Visual Studio Ultimate for Architects

Modeling Projects

Exploring Code

Summary

Chapter 55: Visual Studio Ultimate for Developers

Code Metrics

Managed Code Analysis Tool

C/C++ Code Analysis Tool

Profiling Tools

Standalone Profiler

IntelliTrace

Database Tools

Summary

Chapter 56: Visual Studio Ultimate for Testers

Automated Tests

Relating Code and Tests

Visual Studio Test Management

Microsoft Test Manager

Summary

Chapter 57: Team Foundation Server

Team Project

Process Templates

Work Item Tracking

Excel and Project Integration

Version Control

Team Foundation Build

Reporting and Business Intelligence

Team Portal

Summary

Advertisement

End User License Agreement

List of Illustrations

FIGURE 1-1

FIGURE 1-2

FIGURE 1-3

FIGURE 1-4

FIGURE 1-5

FIGURE 1-6

FIGURE 1-7

FIGURE 1-8

FIGURE 1-9

FIGURE 1-10

FIGURE 1-11

FIGURE 1-12

FIGURE 1-13

FIGURE 1-14

FIGURE 1-15

FIGURE 1-16

FIGURE 2-1

FIGURE 2-2

FIGURE 2-3

FIGURE 2-4

FIGURE 2-5

FIGURE 2-6

FIGURE 2-7

FIGURE 2-8

FIGURE 2-9

FIGURE 2-10

FIGURE 2-11

FIGURE 2-12

FIGURE 2-13

FIGURE 2-14

FIGURE 2-15

FIGURE 2-16

FIGURE 3-1

FIGURE 3-2

FIGURE 3-3

FIGURE 3-4

FIGURE 3-5

FIGURE 3-6

FIGURE 3-7

FIGURE 3-8

FIGURE 3-9

FIGURE 3-10

FIGURE 3-11

FIGURE 3-12

FIGURE 3-13

FIGURE 3-14

FIGURE 3-15

FIGURE 3-16

FIGURE 3-17

FIGURE 3-18

FIGURE 3-19

FIGURE 3-20

FIGURE 3-21

FIGURE 3-22

FIGURE 3-23

FIGURE 4-1

FIGURE 4-2

FIGURE 4-3

FIGURE 4-4

FIGURE 4-5

FIGURE 4-6

FIGURE 4-7

FIGURE 4-8

FIGURE 4-9

FIGURE 4-10

FIGURE 4-11

FIGURE 4-12

FIGURE 4-13

FIGURE 4-14

FIGURE 4-15

FIGURE 4-16

FIGURE 4-17

FIGURE 4-18

FIGURE 4-19

FIGURE 4-20

FIGURE 4-21

FIGURE 4-22

FIGURE 4-23

FIGURE 4-24

FIGURE 4-25

FIGURE 4-26

FIGURE 4-27

FIGURE 4-28

FIGURE 4-29

FIGURE 4-30

FIGURE 4-31

FIGURE 4-32

FIGURE 5-1

FIGURE 5-2

FIGURE 5-3

FIGURE 5-4

FIGURE 5-5

FIGURE 5-6

FIGURE 5-7

FIGURE 5-8

FIGURE 5-9

FIGURE 5-10

FIGURE 5-11

FIGURE 6-1

FIGURE 6-2

FIGURE 6-3

FIGURE 6-4

FIGURE 6-5

FIGURE 6-6

FIGURE 6-7

FIGURE 6-8

FIGURE 6-9

FIGURE 6-10

FIGURE 6-11

FIGURE 6-12

FIGURE 6-13

FIGURE 6-14

FIGURE 6-15

FIGURE 6-16

FIGURE 6-17

FIGURE 6-18

FIGURE 6-19

FIGURE 6-20

FIGURE 6-21

FIGURE 6-22

FIGURE 6-23

FIGURE 6-24

FIGURE 6-25

FIGURE 6-26

FIGURE 6-27

FIGURE 7-1

FIGURE 7-2

FIGURE 7-3

FIGURE 7-4

FIGURE 7-5

FIGURE 7-6

FIGURE 7-7

FIGURE 7-8

FIGURE 7-9

FIGURE 7-10

FIGURE 7-11

FIGURE 7-12

FIGURE 7-13

FIGURE 7-14

FIGURE 7-15

FIGURE 7-16

FIGURE 7-17

FIGURE 7-18

FIGURE 7-19

FIGURE 7-20

FIGURE 7-21

FIGURE 7-22

FIGURE 8-1

FIGURE 8-2

FIGURE 8-3

FIGURE 8-4

FIGURE 8-5

FIGURE 8-6

FIGURE 8-7

FIGURE 8-8

FIGURE 8-9

FIGURE 8-10

FIGURE 8-11

FIGURE 8-12

FIGURE 8-13

FIGURE 8-14

FIGURE 8-15

FIGURE 8-16

FIGURE 8-17

FIGURE 9-1

FIGURE 9-2

FIGURE 9-3

FIGURE 9-4

FIGURE 9-5

FIGURE 9-6

FIGURE 9-7

FIGURE 9-8

FIGURE 9-9

FIGURE 9-10

FIGURE 9-11

FIGURE 9-12

FIGURE 9-13

FIGURE 9-14

FIGURE 9-15

FIGURE 9-16

FIGURE 9-17

FIGURE 10-1

FIGURE 10-2

FIGURE 10-3

FIGURE 10-4

FIGURE 10-5

FIGURE 10-6

FIGURE 10-7

FIGURE 10-8

FIGURE 10-9

FIGURE 11-1

FIGURE 11-2

FIGURE 11-3

FIGURE 11-4

FIGURE 11-5

FIGURE 11-6

FIGURE 11-7

FIGURE 11-8

FIGURE 11-9

FIGURE 11-10

FIGURE 11-11

FIGURE 11-12

FIGURE 12-1

FIGURE 12-2

FIGURE 12-3

FIGURE 12-4

FIGURE 12-5

FIGURE 12-6

FIGURE 12-7

FIGURE 12-8

FIGURE 12-9

FIGURE 12-10

FIGURE 13-1

FIGURE 13-2

FIGURE 13-3

FIGURE 13-4

FIGURE 13-5

FIGURE 13-6

FIGURE 13-7

FIGURE 13-8

FIGURE 13-9

FIGURE 13-10

FIGURE 13-11

FIGURE 13-12

FIGURE 13-13

FIGURE 14-1

FIGURE 14-2

FIGURE 14-3

FIGURE 14-4

FIGURE 14-5

FIGURE 15-1

FIGURE 15-2

FIGURE 15-3

FIGURE 15-4

FIGURE 15-5

FIGURE 15-6

FIGURE 15-7

FIGURE 15-8

FIGURE 15-9

FIGURE 15-10

FIGURE 15-11

FIGURE 15-12

FIGURE 15-13

FIGURE 15-14

FIGURE 15-15

FIGURE 15-16

FIGURE 16-1

FIGURE 16-2

FIGURE 16-3

FIGURE 16-4

FIGURE 16-5

FIGURE 17-1

FIGURE 17-2

FIGURE 17-3

FIGURE 17-4

FIGURE 17-5

FIGURE 17-6

FIGURE 17-7

FIGURE 17-8

FIGURE 17-9

FIGURE 17-10

FIGURE 17-11

FIGURE 17-12

FIGURE 17-13

FIGURE 17-14

FIGURE 17-15

FIGURE 17-16

FIGURE 17-17

FIGURE 17-18

FIGURE 18-1

FIGURE 18-2

FIGURE 18-3

FIGURE 18-4

FIGURE 18-5

FIGURE 18-6

FIGURE 18-7

FIGURE 18-8

FIGURE 18-9

FIGURE 18-10

FIGURE 18-11

FIGURE 18-12

FIGURE 18-13

FIGURE 18-14

FIGURE 18-15

FIGURE 18-16

FIGURE 18-17

FIGURE 18-18

FIGURE 18-19

FIGURE 18-20

FIGURE 18-21

FIGURE 18-22

FIGURE 18-23

FIGURE 18-24

FIGURE 18-25

FIGURE 18-26

FIGURE 18-27

FIGURE 18-28

FIGURE 18-29

FIGURE 18-30

FIGURE 18-31

FIGURE 18-32

FIGURE 18-33

FIGURE 19-1

FIGURE 19-2

FIGURE 19-3

FIGURE 19-4

FIGURE 19-5

FIGURE 19-6

FIGURE 19-7

FIGURE 19-8

FIGURE 19-9

FIGURE 19-10

FIGURE 19-11

FIGURE 19-12

FIGURE 19-13

FIGURE 19-14

FIGURE 19-15

FIGURE 19-16

FIGURE 20-1

FIGURE 20-2

FIGURE 20-3

FIGURE 20-4

FIGURE 20-5

FIGURE 20-6

FIGURE 20-7

FIGURE 20-8

FIGURE 20-9

FIGURE 20-10

FIGURE 20-11

FIGURE 20-12

FIGURE 21-1

FIGURE 21-2

FIGURE 21-3

FIGURE 21-4

FIGURE 21-5

FIGURE 21-6

FIGURE 21-7

FIGURE 21-8

FIGURE 21-9

FIGURE 21-10

FIGURE 21-11

FIGURE 21-12

FIGURE 21-13

FIGURE 21-14

FIGURE 21-15

FIGURE 21-16

FIGURE 21-17

FIGURE 21-18

FIGURE 21-19

FIGURE 21-20

FIGURE 21-21

FIGURE 21-22

FIGURE 21-23

FIGURE 21-24

FIGURE 21-25

FIGURE 21-26

FIGURE 21-27

FIGURE 21-28

FIGURE 21-29

FIGURE 21-30

FIGURE 21-31

FIGURE 21-32

FIGURE 21-33

FIGURE 21-34

FIGURE 21-35

FIGURE 21-36

FIGURE 21-37

FIGURE 21-38

FIGURE 21-39

FIGURE 21-40

FIGURE 21-41

FIGURE 21-42

FIGURE 22-1

FIGURE 22-2

FIGURE 22-3

FIGURE 22-4

FIGURE 22-5

FIGURE 22-6

FIGURE 22-7

FIGURE 22-8

FIGURE 22-9

FIGURE 22-10

FIGURE 22-11

FIGURE 22-12

FIGURE 22-13

FIGURE 23-1

FIGURE 23-2

FIGURE 23-3

FIGURE 23-4

FIGURE 23-5

FIGURE 23-6

FIGURE 23-7

FIGURE 23-8

FIGURE 23-9

FIGURE 23-10

FIGURE 23-11

FIGURE 24-1

FIGURE 24-2

FIGURE 24-3

FIGURE 24-4

FIGURE 24-5

FIGURE 24-6

FIGURE 24-7

FIGURE 24-8

FIGURE 24-9

FIGURE 24-10

FIGURE 24-11

FIGURE 24-12

FIGURE 24-13

FIGURE 24-14

FIGURE 24-15

FIGURE 25-1

FIGURE 25-2

FIGURE 25-3

FIGURE 25-4

FIGURE 25-5

FIGURE 25-6

FIGURE 25-7

FIGURE 25-8

FIGURE 25-9

FIGURE 25-10

FIGURE 25-11

FIGURE 25-12

FIGURE 25-13

FIGURE 25-14

FIGURE 25-15

FIGURE 25-16

FIGURE 25-17

FIGURE 25-18

FIGURE 25-19

FIGURE 25-20

FIGURE 25-21

FIGURE 25-22

FIGURE 26-1

FIGURE 26-2

FIGURE 26-3

FIGURE 26-4

FIGURE 26-5

FIGURE 26-6

FIGURE 26-7

FIGURE 26-8

FIGURE 26-9

FIGURE 26-10

FIGURE 26-11

FIGURE 26-12

FIGURE 27-1

FIGURE 27-2

FIGURE 27-3

FIGURE 27-4

FIGURE 27-5

FIGURE 27-6

FIGURE 27-7

FIGURE 27-8

FIGURE 27-9

FIGURE 27-10

FIGURE 28-1

FIGURE 28-2

FIGURE 28-3

FIGURE 28-4

FIGURE 28-5

FIGURE 28-6

FIGURE 28-7

FIGURE 28-8

FIGURE 28-9

FIGURE 28-10

FIGURE 28-11

FIGURE 28-12

FIGURE 28-13

FIGURE 28-14

FIGURE 28-15

FIGURE 28-16

FIGURE 28-17

FIGURE 28-18

FIGURE 28-19

FIGURE 29-1

FIGURE 29-2

FIGURE 29-3

FIGURE 29-4

FIGURE 29-5

FIGURE 29-6

FIGURE 29-7

FIGURE 29-8

FIGURE 29-9

FIGURE 29-10

FIGURE 29-11

FIGURE 29-12

FIGURE 29-13

FIGURE 29-14

FIGURE 29-15

FIGURE 29-16

FIGURE 29-17

FIGURE 29-18

FIGURE 29-19

FIGURE 29-20

FIGURE 29-21

FIGURE 30-1

FIGURE 30-2

FIGURE 30-3

FIGURE 30-4

FIGURE 30-5

FIGURE 30-6

FIGURE 30-7

FIGURE 30-8

FIGURE 30-9

FIGURE 30-10

FIGURE 30-11

FIGURE 30-12

FIGURE 30-13

FIGURE 31-1

FIGURE 31-2

FIGURE 31-3

FIGURE 31-4

FIGURE 31-5

FIGURE 31-6

FIGURE 31-7

FIGURE 31-8

FIGURE 31-9

FIGURE 31-10

FIGURE 31-11

FIGURE 31-12

FIGURE 31-13

FIGURE 31-14

FIGURE 31-15

FIGURE 31-16

FIGURE 31-17

FIGURE 31-18

FIGURE 31-19

FIGURE 31-20

FIGURE 31-21

FIGURE 31-22

FIGURE 31-23

FIGURE 31-24

FIGURE 31-25

FIGURE 31-26

FIGURE 31-27

FIGURE 31-28

FIGURE 31-29

FIGURE 31-30

FIGURE 31-31

FIGURE 31-32

FIGURE 31-33

FIGURE 31-34

FIGURE 31-35

FIGURE 31-36

FIGURE 31-37

FIGURE 32-1

FIGURE 32-2

FIGURE 32-3

FIGURE 32-4

FIGURE 32-5

FIGURE 32-6

FIGURE 32-7

FIGURE 32-8

FIGURE 32-9

FIGURE 32-10

FIGURE 32-11

FIGURE 33-1

FIGURE 33-2

FIGURE 33-3

FIGURE 33-4

FIGURE 33-5

FIGURE 33-6

FIGURE 33-7

FIGURE 33-8

FIGURE 33-9

FIGURE 33-10

FIGURE 33-11

FIGURE 33-12

FIGURE 33-13

FIGURE 33-14

FIGURE 34-1

FIGURE 34-2

FIGURE 34-3

FIGURE 34-4

FIGURE 34-5

FIGURE 34-6

FIGURE 35-1

FIGURE 35-2

FIGURE 35-3

FIGURE 35-4

FIGURE 36-1

FIGURE 36-2

FIGURE 36-3

FIGURE 36-4

FIGURE 36-5

FIGURE 36-6

FIGURE 36-7

FIGURE 36-8

FIGURE 36-9

FIGURE 37-1

FIGURE 37-2

FIGURE 37-3

FIGURE 37-4

FIGURE 37-5

FIGURE 37-6

FIGURE 38-1

FIGURE 38-2

FIGURE 38-3

FIGURE 38-4

FIGURE 38-5

FIGURE 38-6

FIGURE 39-1

FIGURE 39-2

FIGURE 39-3

FIGURE 39-4

FIGURE 39-5

FIGURE 39-6

FIGURE 40-1

FIGURE 40-2

FIGURE 40-3

FIGURE 40-4

FIGURE 40-5

FIGURE 40-6

FIGURE 40-7

FIGURE 40-8

FIGURE 40-9

FIGURE 40-10

FIGURE 40-11

FIGURE 40-12

FIGURE 40-13

FIGURE 40-14

FIGURE 40-15

FIGURE 40-16

FIGURE 40-17

FIGURE 40-18

FIGURE 40-19

FIGURE 40-20

FIGURE 40-21

FIGURE 40-22

FIGURE 40-23

FIGURE 41-1

FIGURE 41-2

FIGURE 41-3

FIGURE 41-4

FIGURE 41-5

FIGURE 41-6

FIGURE 41-7

FIGURE 41-8

FIGURE 41-9

FIGURE 41-10

FIGURE 41-11

FIGURE 41-12

FIGURE 41-13

FIGURE 41-14

FIGURE 41-15

FIGURE 41-16

FIGURE 41-17

FIGURE 42-1

FIGURE 42-2

FIGURE 42-3

FIGURE 42-4

FIGURE 42-5

FIGURE 42-6

FIGURE 42-7

FIGURE 42-8

FIGURE 42-9

FIGURE 42-10

FIGURE 43-1

FIGURE 43-2

FIGURE 43-3

FIGURE 43-4

FIGURE 43-5

FIGURE 43-6

FIGURE 43-7

FIGURE 43-8

FIGURE 43-9

FIGURE 43-10

FIGURE 43-11

FIGURE 43-12

FIGURE 43-13

FIGURE 43-14

FIGURE 43-15

FIGURE 44-1

FIGURE 44-2

FIGURE 44-3

FIGURE 44-4

FIGURE 44-5

FIGURE 44-6

FIGURE 44-7

FIGURE 44-8

FIGURE 44-9

FIGURE 44-10

FIGURE 44-11

FIGURE 44-12

FIGURE 44-13

FIGURE 44-14

FIGURE 44-15

FIGURE 44-16

FIGURE 44-17

FIGURE 44-18

FIGURE 44-19

FIGURE 44-20

FIGURE 44-21

FIGURE 44-22

FIGURE 44-23

FIGURE 44-24

FIGURE 44-25

FIGURE 45-1

FIGURE 45-2

FIGURE 46-1

FIGURE 46-2

FIGURE 46-3

FIGURE 46-4

FIGURE 46-5

FIGURE 46-6

FIGURE 46-7

FIGURE 46-8

FIGURE 46-9

FIGURE 46-10

FIGURE 47-1

FIGURE 47-2

FIGURE 47-3

FIGURE 47-4

FIGURE 47-5

FIGURE 48-1

FIGURE 48-2

FIGURE 48-3

FIGURE 48-4

FIGURE 48-5

FIGURE 48-6

FIGURE 48-7

FIGURE 48-8

FIGURE 48-9

FIGURE 48-10

FIGURE 48-11

FIGURE 48-12

FIGURE 48-13

FIGURE 48-14

FIGURE 48-15

FIGURE 49-1

FIGURE 49-2

FIGURE 49-3

FIGURE 49-4

FIGURE 49-5

FIGURE 49-6

FIGURE 49-7

FIGURE 49-8

FIGURE 49-9

FIGURE 49-10

FIGURE 49-11

FIGURE 49-12

FIGURE 49-13

FIGURE 49-14

FIGURE 49-15

FIGURE 49-16

FIGURE 50-1

FIGURE 50-2

FIGURE 50-3

FIGURE 50-4

FIGURE 50-5

FIGURE 52-1

FIGURE 52-2

FIGURE 52-3

FIGURE 52-4

FIGURE 52-5

FIGURE 52-6

FIGURE 52-7

FIGURE 52-8

FIGURE 52-9

FIGURE 52-10

FIGURE 52-11

FIGURE 52-12

FIGURE 52-13

FIGURE 53-1

FIGURE 53-2

FIGURE 53-3

FIGURE 54-1

FIGURE 54-2

FIGURE 54-3

FIGURE 54-4

FIGURE 54-5

FIGURE 54-6

FIGURE 54-7

FIGURE 54-8

FIGURE 54-9

FIGURE 54-10

FIGURE 54-11

FIGURE 54-12

FIGURE 54-13

FIGURE 54-14

FIGURE 54-15

FIGURE 54-16

FIGURE 54-17

FIGURE 54-18

FIGURE 54-19

FIGURE 54-20

FIGURE 55-1

FIGURE 55-2

FIGURE 55-3

FIGURE 55-4

FIGURE 55-5

FIGURE 55-6

FIGURE 55-7

FIGURE 55-8

FIGURE 55-9

FIGURE 55-10

FIGURE 55-11

FIGURE 55-12

FIGURE 55-13

FIGURE 55-14

FIGURE 55-15

FIGURE 56-1

FIGURE 56-2

FIGURE 56-3

FIGURE 56-4

FIGURE 56-5

FIGURE 56-6

FIGURE 56-7

FIGURE 56-8

FIGURE 56-9

FIGURE 56-10

FIGURE 56-11

FIGURE 56-12

FIGURE 56-13

FIGURE 56-14

FIGURE 56-15

FIGURE 56-16

FIGURE 56-17

FIGURE 57-1

FIGURE 57-2

FIGURE 57-3

FIGURE 57-4

FIGURE 57-5

FIGURE 57-6

FIGURE 57-7

FIGURE 57-8

FIGURE 57-9

FIGURE 57-10

FIGURE 57-11

FIGURE 57-12

FIGURE 57-13

FIGURE 57-14

FIGURE 57-15

FIGURE 57-16

FIGURE 57-17

FIGURE 57-18

FIGURE 57-19

FIGURE 57-20

FIGURE 57-21

FIGURE 57-22

FIGURE 57-23

FIGURE 57-24

FIGURE 57-25

FIGURE 57-26

List of Tables

TABLE 7-1: IntelliSense Commands

TABLE 8-1: Information Panes for Snippets

TABLE 9-1: Values for DefaultSwitch

TABLE 15-1: Template Parameters

TABLE 37.1: Locking Attributes

TABLE 37.2: Settings Objects Methods

TABLE 38.1: Some Common Connection Properties

TABLE 44-1: Methods for Outputting Debug Messages

TABLE 44-2: IntelliTrace Data Collection Types

TABLE 45-1: Compatible Project Types

TABLE 55-1: Some Report Views

Pages

vii

viii

ix

x

xi

xii

xiii

xiv

xv

xvi

xlii

xliii

xliv

xlv

xlvi

xlvii

xlviii

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

668

669

670

671

672

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

698

699

700

701

702

703

704

705

706

707

708

709

710

711

712

713

714

715

716

717

718

719

720

721

722

723

724

725

726

727

728

729

730

731

732

733

734

735

736

737

738

739

740

741

742

743

744

745

746

747

748

749

750

751

752

753

754

755

756

757

758

759

760

761

762

763

764

765

766

767

768

769

770

771

772

773

774

775

776

777

778

779

780

781

782

783

784

785

786

787

788

789

790

791

792

793

794

795

796

797

798

799

800

801

802

803

804

805

806

807

808

809

810

811

812

813

814

815

816

817

818

819

820

821

822

823

824

825

826

827

828

829

830

831

832

833

834

835

836

837

838

839

840

841

842

843

844

845

846

847

848

849

850

851

852

853

854

855

856

857

858

859

860

861

862

863

864

865

866

867

868

869

870

871

872

873

874

875

876

877

878

879

880

881

882

883

884

885

886

887

888

889

890

891

892

893

894

895

896

897

898

899

900

901

902

903

904

905

906

907

908

909

910

911

912

913

914

915

916

917

918

919

920

921

922

923

924

925

926

927

928

929

930

931

932

933

934

935

936

937

938

939

940

941

942

943

944

945

946

947

948

949

950

951

952

953

954

955

956

957

958

959

960

961

962

963

964

965

966

967

968

969

970

971

972

973

974

975

976

977

978

979

980

981

982

983

984

985

986

987

988

989

990

991

992

993

994

995

996

997

998

999

1000

1001

1002

1003

1004

1005

1006

1007

1008

1009

1010

1011

1012

1054

Guide

Cover

Table of Contents

Begin Reading

Part IIntegrated Development Environment

CHAPTER 1: A Quick TourCHAPTER 2: The Solution Explorer, Toolbox, and PropertiesCHAPTER 3: Options and CustomizationsCHAPTER 4: The Visual Studio WorkspaceCHAPTER 5: Find and Replace and Help

Chapter 1A Quick Tour

WHAT’S IN THIS CHAPTER?

Installing and getting started with Visual Studio 2013Creating and running your first applicationDebugging and deploying an application

Ever since software has been developed, there has been a need for tools to help write, compile, debug, and deploy applications. Microsoft Visual Studio 2013 is the next iteration in the continual evolution of a best-of-breed integrated development environment (IDE).

This chapter introduces the Visual Studio 2013 user experience and shows you how to work with the various menus, toolbars, and windows. It serves as a quick tour of the IDE, and as such it doesn’t go into detail about what settings can be changed or how to go about customizing the layout because these topics are explored in the following chapters.

GETTING STARTED

With each iteration of the Visual Studio product, the installation process has been incrementally improved, meaning that you can get up and running with Visual Studio 2013 with minimal fuss. This section walks you through the installation process and getting started with the IDE.

Installing Visual Studio 2013

When you launch Visual Studio 2013 setup, you’ll see the dialog in Figure 1-1, which enables you to specify the location for the installation. After you have read the licensing information (in great detail, of course), you can click the check box to accept the terms and move to the next screen in the installation sequence. You’ll also notice an option to join the Visual Studio Experience Improvement Program. If you do so, anonymous information about how you use the product will be sent to Microsoft occasionally. And just so you have a sense of how that information is used, realize that many of the user interface changes that you’re about to see were determined based on this feedback. So get involved, because your use (or lack of use) of Visual Studio helps make future versions better.

FIGURE 1-1

Visual Studio 2013 naturally has a number of mandatory features. Because these features are built in, the installation process doesn’t bother mentioning them. However, you can select from a number of optional features, as shown in Figure 1-2. Choose the features you believe you need (keeping in mind that you can always add or remove them later) and click Install to begin the process.

FIGURE 1-2

At this point, you’ll see the progress dialog, as shown in Figure 1-3. Depending on which components you already have installed on your computer, you may be prompted to restart your computer midway through or at the end of the installation process. When all the components have been successfully installed, a Setup Summary dialog indicates that there were no problems with the installation process.

FIGURE 1-3

Running Visual Studio 2013

When you launch Visual Studio, the Microsoft Visual Studio 2013 splash screen appears. Like a lot of splash screens, it provides information about the version of the product, as shown in Figure 1-4.

FIGURE 1-4

NOTEAn interesting fact about the splash screen is that although a large portion of Visual Studio uses Windows Presentation Foundation (WPF) to display its content, the splash screen in Visual Studio 2013 is done in native code so that it displays as soon as possible after you start Visual Studio.

The first time you run Visual Studio 2013, you’ll be given the opportunity to sign in, as shown in Figure 1-5.

FIGURE 1-5

This behavior is different from every previous version of Visual Studio, and it moves the tool to be more in line with other productivity applications, such as Microsoft Word and Excel. There is no requirement for you to log in. If you look below the Sign In button in Figure 1-5, there is a Not Now, Maybe Later link. Clicking on that link skips a number of steps (you still need to select the default environment settings) and lets you get to Visual Studio quickly.

Is Visual Studio Really Cloud Enabled?

The quick answer is “Yes.” A more accurate answer is “Yes, if you want it to be.” Part of the research work behind creating this feature involved Microsoft gaining an understanding of how developers identified themselves to various online functions. In general, most developers have two or more Microsoft accounts that they use when they develop. There is a primary identity, which typically maps to the credentials used by the person while working. Then there are additional identities used to access external functions, such as Team Foundation Server, or to publish apps onto the various Microsoft stores.

To mimic how developers work with these multiple online identities, Microsoft introduces a hierarchical relationship between these identities within Visual Studio. When you sign in, the account you specify is the primary identity for the Visual Studio IDE. It should, in theory, represent you (that is you, the person). Every place you sign into Visual Studio with the same credentials, your preferred settings will follow you. This includes customizations like themes and keyboard bindings. And a change on one device will automatically flow to the other devices you are signed into.

To handle the secondary credentials, Visual Studio 2013 contains a secure credential store. This allows the connections that you have made to external services to be remembered and used without the need to provide authentication each time. Naturally, you can manually sign out from a particular connection and the credentials will be removed.

To allow your settings to roam from machine to machine, you need to sign in, a process which is initiated when you click the Sign In button shown in Figure 1-5. After a few moments, you are prompted to enter your Microsoft account credentials.

After you have signed in, you will be welcomed with the warmth that only a splash screen can provide, as illustrated in Figure 1-6.

FIGURE 1-6

On this screen, you have the option to choose the default theme for the IDE. In addition, you can select from a number of pre-created sets of environment settings. The environment settings set up function keys and hot-key sequences as shortcuts to commonly used Visual Studio commands.

Take a moment to review the various options in this list, as shown in Figure 1-7. The differences between them as reflected in the IDE vary. You’ll find that the environment settings affect the position and visibility of various windows, menus, toolbars, and even keyboard shortcuts. Regardless of which option you select, you can easily modify the settings through the IDE.

FIGURE 1-7

NOTEThe name “Visual Basic” in the list of development settings makes it sound like it’s a natural fit for Visual Basic .NET developers. However, it’s not. These settings have been configured for VB6 developers and will infuriate Visual Basic .NET developers who are not familiar with VB6, because they will be used for different shortcut key mappings. Visual Basic .NET developers should use the general development settings because these use the standard keyboard mappings without being geared toward another development language.

You might also notice that a link labeled View Your Visual Studio Profile appears under your name. If you click the link, you to go a website where your current profile information is displayed. Figure 1-8 contains an example of what such a profile page looks like.

FIGURE 1-8

Along with providing a mechanism for editing the basic contact information for the profile, it also includes the Team Foundation Service (TFS) accounts with which the account is associated. At the moment, the profile page seems a little barren. However, the volume of information that appears here is likely to increase over time as additional functionality is introduced.

THE VISUAL STUDIO IDE

Depending on which set of environment settings you select, when you click the Start Visual Studio button, you will most likely see a dialog indicating that Visual Studio is configuring the development environment. When this process is complete, Visual Studio 2013 opens, ready for you to start working, as shown in Figure 1-9.

FIGURE 1-9

Regardless of the environment settings you select, you’ll see the Start Page in the center of the screen. The page contains links to find out what’s new in various Microsoft technologies, a collection of videos that talk about different features in Visual Studio (or other products), and a list of recent announcements related to Visual Studio.

Before you launch into building your first application, you must take a step back to look at the components that make up the Visual Studio 2013 IDE. Menus and toolbars are positioned along the top of the environment, and a selection of subwindows, or panes, appears on the left, right, and bottom of the main window area. In the center is the main editor space. Whenever you open a code file, an XML document, a form, or some other file, it appears in this space for editing. With each file you open, a tab is created so that you can easily switch between opened files.

On either side of the editor space is a set of tool windows. These areas provide additional contextual information and functionality. For the general developer settings, the default layout includes the Solution Explorer and Class View on the right, and the Server Explorer and Toolbox on the left. The tool windows on the left are in their collapsed, or unpinned, state. If you click a tool window’s title, it expands; it collapses again when it no longer has focus or you move the cursor to another area of the screen. When a tool window is expanded, you see a series of three icons at the top right of the window, similar to those shown in the top right corner of the left image of Figure 1-10.

FIGURE 1-10

If you want the tool window to remain in its expanded, or pinned, state, you can click the middle icon, which looks like a pin. The pin rotates 90 degrees to indicate that the window is now pinned. Clicking the third icon, the X, closes the window. If later you want to reopen this or another tool window, you can select it from the View menu.

NOTESome tool windows are not accessible via the View menu; for example, those having to do with debugging, such as threads and watch windows. In most cases these windows are available via an alternative menu item; for the debugging windows, it is the Debug menu.

The right image in Figure 1-10 shows the context menu that appears when the first icon, the down arrow, is clicked. Each item in this list represents a different way to arrange the tool window. As you would imagine, the Float option enables the tool window to be placed anywhere on the screen, independent of the main IDE window. This is useful if you have multiple screens because you can move the various tool windows onto the additional screen, allowing the editor space to use the maximum screen real estate. Selecting the Dock as Tabbed Document option makes the tool window into an additional tab in the editor space. In Chapter 4, “The Visual Studio Workspace,” you’ll learn how to effectively manage the workspace by docking tool windows.

Developing, Building, Debugging, and Deploying Your First Application

Now that you have seen an overview of the Visual Studio 2013 IDE, this section walks you through creating a simple application that demonstrates working with some of these components. This is, of course, the mandatory “Hello World” sample that every developer needs to know, and it can be done in either Visual Basic .NET or C#, depending on what you feel more comfortable with.

Start by selecting File New Project. This opens the New Project dialog, as shown in

Figure 1-11

. There is a tree on the left side of the dialog for grouping templates based on language and technology. And there is also a search box in the top-right corner. The right pane of this dialog displays additional information about the project template you have selected. Lastly, you can select the version of the .NET Framework that the application will target using the drop-down at the top of the dialog.

FIGURE 1-11

Select WPF Application from the Templates area (this item exists under the root Visual Basic and Visual C# nodes, or under the subnode Windows) and set the Name to

GettingStarted

before selecting OK. This creates a new WPF application project, which includes a single startup window and is contained within a GettingStarted solution, as shown in the Solution Explorer window of

Figure 1-12

. This startup window has automatically opened in the visual designer, giving you a graphical representation of what the window will look like when you run the application. The Properties tool window is collapsed and sits on the right side of the windows.

FIGURE 1-12

Click the collapsed Toolbox window, which appears on the left side of the screen. This causes the Toolbox to expand. Then click on the pin icon, which keeps the tool window open. To add controls to the window in the GettingStarted project, select the appropriate items from the Toolbox and drag them onto the form. Alternatively, you can double-click the item, and Visual Studio automatically adds them to the window.

Add a button and textbox to the form so that the layout looks similar to the one shown in

Figure 1-13

. Select the textbox, and select the Properties tool window. (You can press F4 to automatically open the Properties tool window.) Change the name of the control (found at the top of the Properties tool window) to

txtSayHello

. Repeat for the Button control, naming it

btnSayHello

and setting the

Content

property to

Say Hello!

FIGURE 1-13

You can quickly locate a property by typing its name into the search field located beneath the Name field. In

Figure 1-13

Content

has been entered to reduce the list of Properties so that it’s easier to locate the Content property.

After you add controls to the window, the tab is updated with an asterisk (∗) after the text to indicate that there are unsaved changes to that particular item. If you attempt to close this item while changes are pending, you are asked if you want to save the changes. When you build the application, any unsaved files are automatically saved as part of the build process.

NOTEOne thing to be aware of is that some files, such as the solution file, are modified when you make changes within Visual Studio 2013 without your being given any indication that they have changed. If you try to exit the application or close the solution, you are still prompted to save these changes.

Deselect all controls (you can click an empty spot on the screen to do this), and then double-click the button. This not only opens the code editor with the code-behind file for this form, it also creates and wires up an event handler for the click event on the button.

Figure 1-14

shows the code window after a single line has been added to echo the message to the user.

FIGURE 1-14

Before you build and execute your application, place the cursor somewhere on the line containing

MessageBox.Show

and press F9. This sets a breakpoint; when you run the application by pressing F5 and then click the “Say Hello!” button, the execution halts at this line.

Figure 1-15

illustrates this breakpoint being reached. The data tip, which appears when the mouse hovers over the line, shows the contents of the

txtSayHello.Text

property.

FIGURE 1-15

The layout of Visual Studio in

Figure 1-15

is significantly different from the previous screenshots because a number of tool windows are visible in the lower half of the screen, and command bars are visible at the top. Also, the status bar at the bottom of the IDE is orange, as opposed to the blue that appears when in design mode. When you stop running or debugging your application, Visual Studio returns to the previous layout. Visual Studio 2013 maintains two separate layouts: design time and run time. Menus, toolbars, and various windows have default layouts for when you edit a project, whereas a different setup is defined for when a project is executed and debugged. You can modify each of these layouts to suit your own style, and Visual Studio 2013 remembers them.

You need to deploy your application. Whether you build a rich client application using Windows Forms or WPF, or a web application, Visual Studio 2013 has the capability to publish your application. Double-click the Properties node in Solution Explorer, and select the Publish node to display the options for publishing your application, as shown in

Figure 1-16

.

FIGURE 1-16

In

Figure 1-16

, the publishing folder has been set to a local path (by default, the path is relative to the directory in which the project is found), but you can specify a network folder, an Internet Information Services (IIS) folder, or an FTP site instead. After you specify where you want to publish to, clicking Publish Now publishes your application to that location.

SUMMARY

You’ve seen how the various components of Visual Studio 2013 work together to build an application. The following list outlines the typical process of creating a solution:

Use the File menu to create a solution.

Use the Solution Explorer to locate the window that needs editing, and double-click the item to show it in the main workspace area.

Drag the necessary components onto the window from the Toolbox.

Select the window and each component in turn, and edit the properties in the Properties window.

Double-click the window or a control to access the code behind the component’s graphical interface.

Use the main workspace area to write code and design the graphical interface, switching between the two via the tabs at the top of the area.

Use the toolbars to start the program.

If errors occur, review them in the Error List and Output windows.

Save the project using either toolbar or menu commands, and exit Visual Studio 2013.

In subsequent chapters, you’ll learn how to customize the IDE to more closely fit your own working style. You’ll also see how Visual Studio 2013 takes a lot of the guesswork out of the application development process and a number of best practices for working with Visual Studio 2013 that you can reuse as a developer.

Chapter 2The Solution Explorer, Toolbox, and Properties

WHAT’S IN THIS CHAPTER?

Arranging files with the Solution ExplorerAdding projects, items, and references to your solutionWorking with the Properties tool windowInclude your own properties in the Properties tool window

In Chapter 1, “A Quick Tour,” you briefly saw and interacted with a number of the components that make up the Visual Studio 2013 IDE. Now you get an opportunity to work with three of the most commonly used tool windows: the Solution Explorer, the Toolbox, and Properties.

Throughout this and other chapters you see references to keyboard shortcuts, such as Ctrl+S. In these cases, we assume the use of the general development settings, as shown in Chapter 1. Other profiles may have different key combinations. And, as you will see in upcoming chapters, you can use the Quick Launch area to get to commands regardless of the development settings that you use.

THE SOLUTION EXPLORER

Whenever you create or open an application, or for that matter just a single file, Visual Studio 2013 uses the concept of a solution to tie everything together. Typically, a solution is made up of one or more projects, each of which can have multiple items associated with it. In the past these items were typically just files, but increasingly projects are made up of items that may consist of multiple files, or in some cases no files at all. Chapter 6, “Solutions, Projects, and Items,” goes into more detail about projects, the structure of solutions, and how items are related.

The Solution Explorer tool window (Ctrl+Alt+L) provides a convenient visual representation of the solution, projects, and items, as shown in Figure 2-1. In this figure you can see three projects presented in a tree: a C# Windows Presentation Foundation (WPF) application, a C# Windows Communication Foundation (WCF) service library, and a Visual Basic (VB) class library.

FIGURE 2-1

Each project has an icon associated with it that typically indicates the type of project and the language it is written in. There are some exceptions to this rule: Some projects, such as SQL Server or Modeling projects, aren’t tied to a specific language.

One node is particularly noticeable because the font is boldfaced. This indicates that this project is the startup project — in other words, the project that is launched when you select Debug Start Debugging or press F5. To change the startup project, right-click the project you want to nominate and select Set as StartUp Project. You can also nominate multiple projects as startup projects via the Solution Properties dialog, which you can reach by selecting Properties from the right-click menu of the Solution node.

NOTEWith certain environment settings, the Solution node is not visible when only a single project exists. A problem with this setting is that it becomes difficult to access the Solution Properties window. To get the Solution node to appear, you can either add another project to the solution or check the Always Show Solution item from the Projects and Solutions node in the Options dialog, accessible via ToolsOptions.