Professional Visual Studio 2015
Buy Rights Online Buy Rights

Rights Contact Login For More Details

More About This Title Professional Visual Studio 2015

English

In-depth coverage of the major Visual Studio 2015 revamp

Professional Visual Studio 2015 is the leading pro's guide to new and upgraded features of Microsoft Visual Studio. With a unique IDE-centric approach and deep dive into the software's many nooks and crannies, this book will bring you up to speed quickly on everything Visual Studio 2015 has to offer. Whether you're new to Visual Studio or just upgrading, you'll appreciate in-depth, professional explanation of updates, features, and support. Visual Studio 2015 is packed with improvements that increase productivity, and this book walks you through each one in succession to help you smooth your workflow and get more accomplished. From customization and the interface to code snippets and debugging, the Visual Studio upgrade expands your options — and this book is your fast-track guide to getting on board quickly.

The Visual Studios 2015 release fixes a number of issues that deterred many professionals from adopting VS 2013. Old products have been retooled, and new features are aimed at productivity enhancement and fixes to UI. Fully aligned with VS 2015, this guide walks you through the changes and helps you incorporate helpful new features into the way you work.

  • Discover new options for themes, displays, and settings
  • Learn the new workflow and shortcuts to ASP.NET code
  • Master improved debugging and unit testing support capabilities
  • Exploit changes to Windows STORE apps, phone apps, Azure, and SharePoint

English

About the author

Bruce Johnson is a partner at ObjectSharp Consulting and a 30-year veteran of the computer industry. For nearly 20 years, his projects have been on the leading edge of Windows technology. Bruce is a Microsoft Certified Trainer, a Microsoft MVP, and a frequent speaker at conferences and user groups. He has written several Wrox guides as well as columns and articles for numerous magazines.

English

INTRODUCTION xxxix

PART I: INTEGRATED DEVELOPMENT ENVIRONMENT 1

CHAPTER 1: A QUICK TOUR 3

Getting Started 3

Installing Visual Studio 2015 3

Running Visual Studio 2015 6

Is Visual Studio Really Cloud Enabled? 7

The Visual Studio IDE 10

Developing, Building, Debugging, and Deploying Your First Application 12

Summary 17

CHAPTER 2: THE SOLUTION EXPLORER, TOOLBOX, AND PROPERTIES 19

The Solution Explorer 20

Previewing Files 22

Common Tasks 23

Adding Projects and Items 25

Adding References 28

Adding Service References 29

Adding Connected Services 30

Adding Analyzers 31

Adding NuGet Packages 32

The Toolbox 35

Arranging Components 37

Adding Components 38

Properties 40

Extending the Properties Window 42

The Browsable Attribute 42

DisplayName Attribute 43

Description 43

Category 43

DefaultValue 44

AmbientValue 44

Summary 46

CHAPTER 3: OPTIONS AND CUSTOMIZATIONS 47

The Start Page 48

Customizing the Start Page 49

Window Layout 49

Viewing Windows and Toolbars 50

Docking 50

Saving the Window Layout 53

The Editor Space 55

Navigating Open Items 57

Fonts and Colors 58

Visual Guides 59

Full-Screen Mode 60

Tracking Changes 61

Other Options 62

Keyboard Shortcuts 62

Quick Launch 63

Projects and Solutions 65

Build and Run 66

VB Options 67

Importing and Exporting Settings 67

Synchronized Settings 70

Summary 71

CHAPTER 4: THE VISUAL STUDIO WORKSPACE 73

The Code Editor 73

The Code Editor Window Layout 74

Regions 75

Outlining 75

Code Formatting 76

Navigating Forward/Backward 78

Additional Code Editor Features 78

Reference Highlighting 78

Code Zooming 78

Word Wrap 79

Line Numbers 79

Auto Brace Complete 80

Split View 80

Tear Away (Floating) Code Windows 81

Duplicating Solution Explorer 82

Creating Tab Groups 82

Advanced Functionality 84

Commenting/Uncommenting a Code Block 84

Block Selection 84

Multiline Editing 84

The Clipboard Ring 85

Full-Screen View 85

Go to Defi nition 85

Find All References 85

Code Navigation 86

Peek Definition 86

Enhanced Scrollbar 87

Navigate To 89

The Command Window 91

The Immediate Window 92

The Class View 93

The Error List 94

The Object Browser 95

The Document Outline Tool Window 96

HTML Outlining 97

Control Outlining 98

Reorganizing Tool Windows 100

Summary 101

CHAPTER 5: FIND AND REPLACE AND HELP 103

Quick Find/Replace 104

Quick Find 104

Quick Replace 105

Find Options 106

Find and Replace Options 106

Find/Replace in Files 106

Find in Files 107

Find Dialog Options 108

Regular Expressions 109

Results Window 111

Replace in Files 111

Accessing Help 112

Navigating and Searching the Help System 114

Configuring the Help System 114

Summary 115

PART II: GETTING STARTED 117

CHAPTER 6: SOLUTIONS, PROJECTS, AND ITEMS 119

Solution Structure 120

Solution File Format 121

Solution Properties 122

Common Properties 123

Configuration Properties 124

Project Types 126

Project Files Format 128

Project Properties 129

Application 130

Assembly Information 130

User Account Control Settings 131

Application Framework (Visual Basic Only) 132

Compile (Visual Basic Only) 133

Build (C# and F# Only) 135

Build Events (C# and F# Only) 136

Debug 137

Start Action 137

Start Options 137

Enable Debuggers 137

References (Visual Basic Only) 138

Resources 139

Services 140

Settings 141

Reference Paths (C# and F# Only) 142

Signing 143

My Extensions (Visual Basic Only) 144

Security 144

Publish 145

Code Analysis 146

Web Application Project Properties 147

Web 148

Silverlight Applications 148

Package/Publish Web 149

Package/Publish SQL 150

Web Site Projects 151

NuGet Packages 152

NuGet Package Manager 152

Package Manager Console 154

Summary 154

CHAPTER 7: INTELLISENSE AND BOOKMARKS 155

IntelliSense Explained 155

General IntelliSense 156

IntelliSense and C++ 158

Completing Words and Phrases 158

In Context 159

List Members 160

Suggestion Mode 160

Stub Completion 161

Generate From Usage 163

Parameter Information 165

Quick Info 166

JavaScript IntelliSense 166

The JavaScript IntelliSense Context 167

Referencing Another JavaScript File 167

XAML IntelliSense 168

IntelliSense Options 169

General Options 169

Statement Completion 171

C#-Specific Options 171

Extended IntelliSense 172

Code Snippets 173

XML Comments 173

Adding Your Own IntelliSense 173

Bookmarks and the Bookmark Window 173

Summary 176

CHAPTER 8: CODE SNIPPETS AND REFACTORING 177

Code Snippets Revealed 178

Storing Code Blocks in the Toolbox 178

Code Snippets 179

Using Snippets in C# 179

Using Snippets in VB 181

Surround With Snippet 182

Code Snippets Manager 183

Creating Snippets 184

Reviewing Existing Snippets 184

Distributing Code Snippets 188

Accessing Refactoring Support 189

Refactoring Actions 189

Extract Method 190

Encapsulate Field 191

Extract Interface 192

Change Signature 193

Inline and Explaining Variables 194

Rename 195

Generate Method Stub 195

Organize Usings 196

Summary 197

CHAPTER 9: SERVER EXPLORER 199

Server Connections 200

Event Logs 201

Management Classes 204

Management Events 206

Message Queues 210

Performance Counters 213

Services 217

Data Connections 218

SharePoint Connections 219

Summary 220

CHAPTER 10: MODELING WITH THE CLASS DESIGNER 221

Creating a Class Diagram 222

The Design Surface 223

The Toolbox 224

Entities 224

Connectors 225

The Class Details 226

The Properties Window 227

Layout 228

Exporting Diagrams 229

Code Generation and Refactoring 229

Drag-and-Drop Code Generation 229

IntelliSense Code Generation 232

Refactoring with the Class Designer 232

Summary 233

PART III: DIGGING DEEPER 235

CHAPTER 11: UNIT TESTING 237

Your First Test Case 238

Identifying Tests Using Attributes 243

TestClass 243

TestMethod 244

Additional Test Attributes 244

Description 244

Owner 244

Priority 244

TestCategories 244

WorkItems 245

Ignore 245

Timeout 245

Unit Tests and Code Lens 246

Asserting the Facts 248

The Assert Class 248

The StringAssert Class 249

The CollectionAssert Class 249

The ExpectedException Attribute 249

Initializing and Cleaning Up 251

TestInitialize and TestCleanup 251

ClassInitialize and ClassCleanup 251

AssemblyInitialize and AssemblyCleanup 252

Testing Context 252

Data 253

Writing Test Output 255

Advanced Unit Testing 257

Custom Properties 257

Testing Private Members 258

IntelliTest 259

Summary 262

CHAPTER 12: DOCUMENTATION WITH XML COMMENTS 263

Inline Commenting 264

XML Comments 265

Adding XML Comments 265

XML Comment Tags 266

The <c> Tag 266

The <code> Tag 267

The <example> Tag 267

The <exception> Tag 268

The <include> Tag 269

The <list> Tag 271

The <para> Tag 272

The <param> Tag 272

The <paramref> Tag 273

The <permission> Tag 274

The <remarks> Tag 274

The <returns> Tag 275

The <see> Tag 276

The <seealso> Tag 276

The <summary> Tag 277

The <typeparam> Tag 277

The <typeparamref> Tag 278

The <value> Tag 279

Using XML Comments 279

IntelliSense Information 281

Generating Documentation with GhostDoc 281

Compiling Documentation with Sandcastle 282

Task List Comments 286

Summary 288

CHAPTER 13: CODE CONSISTENCY TOOLS 289

Source Control 289

Selecting a Source Control Repository 290

Environment Settings 291

Accessing Source Control 291

Adding the Solution 291

Solution Explorer 293

Changes 293

Merging Changes 294

History 296

Summary 297

CHAPTER 14: CODE GENERATION WITH T4 299

Creating a T4 Template 300

T4 Building Blocks 303

Expression Blocks 304

Statement Blocks 304

Class Feature Blocks 306

How T4 Works 307

T4 Directives 310

Template Directive 310

Output Directive 311

Assembly Directive 311

Import Directive 312

Include Directive 313

Troubleshooting 313

Design-Time Errors 314

Compiling Transformation Errors 314

Executing Transformation Errors 315

Generated Code Errors 315

Generating Code Assets 316

Runtime Text Templates 319

Using Runtime Text Templates 321

Differences between Runtime Text Templates and Standard T4 Templates 324

Tips and Tricks 325

Summary 326

CHAPTER 15: PROJECT AND ITEM TEMPLATES 327

Creating Templates 327

Item Template 328

Project Template 332

Template Structure 333

Template Parameters 335

Template Locations 336

Extending Templates 337

Template Project Setup 337

IWizard 337

Generating the Extended Project Template 342

Starter Kits 343

Online Templates 344

Summary 345

CHAPTER 16: LANGUAGE-SPECIFIC FEATURES 347

Hitting a Nail with the Right Hammer 348

Imperative 348

Declarative 348

Dynamic 349

Functional 349

What’s It All Mean? 350

A Tale of Two Languages 351

.NET Compiler Platform (Roslyn) 351

The Compiler API 352

The Diagnostic API 353

Workspaces API 353

F# 353

Your First F# Program 353

Exploring F# Language Features 357

Type Providers 359

Query Expressions 360

Auto-Implemented Properties 360

Summary 361

PART IV: RICH CLIENT APPLICATIONS 363

CHAPTER 17: WINDOWS FORMS APPLICATIONS 365

Getting Started 365

The Windows Form 366

Appearance Properties 368

Layout Properties 369

Window Style Properties 369

Form Design Preferences 369

Adding and Positioning Controls 371

Vertically Aligning Text Controls 373

Automatic Positioning of Multiple Controls 374

Tab Order and Layering Controls 375

Locking Control Design 376

Setting Control Properties 376

Service-Based Components 377

Smart Tag Tasks 378

Container Controls 379

Panel and SplitContainer 379

FlowLayoutPanel 380

TableLayoutPanel 381

Docking and Anchoring Controls 382

Summary 383

CHAPTER 18: WINDOWS PRESENTATION FOUNDATION (WPF) 385

What Is WPF? 386

Getting Started with WPF 387

XAML Fundamentals 389

The WPF Controls 390

The WPF Layout Controls 392

The WPF Designer and XAML Editor 394

Working with the XAML Editor 396

Working with the WPF Designer 396

The Properties Tool Window 399

Data Binding Features 405

Styling Your Application 410

Windows Forms Interoperability 413

Hosting a WPF Control in Windows Forms 413

Hosting a Windows Forms Control in WPF 415

Debugging with the WPF Visualizer 416

Summary 418

CHAPTER 19: OFFICE BUSINESS APPLICATIONS 419

Choosing an Offi ce Project Type 420

Document-Level Customizations 421

Application-Level Add-Ins 421

Creating a Document-Level Customization 422

Your First VSTO Project 422

Protecting the Document Design 426

Adding an Actions Pane 427

Creating an Application Add-In 429

Some Outlook Concepts 429

Creating an Outlook Form Region 430

Debugging Office Applications 434

Unregistering an Add-In 434

Disabled Add-Ins 436

Deploying Office Applications 437

Summary 438

CHAPTER 20: WINDOWS STORE APPLICATIONS 439

What Is a Windows Store Application? 440

Content before Chrome 441

Snap and Scale 441

Semantic Zoom 441

Contracts 442

Tiles 442

Embracing the Cloud 442

Creating a Windows Store Application 443

The Windows 8 Simulator 446

Interaction Mode 447

Two-Finger Gestures 447

Device Characteristics 447

Location 448

Screenshots 449

Network Simulation 449

Your Windows Store Application 449

.NET Native Compilation 451

Compiling Using .NET Native Tools 452

Summary 453

CHAPTER 21: WINDOWS PHONE 455

Creating a Windows Phone Project 455

Debugging Your Application 458

Using the Windows Phone Emulator 459

Deploying to a Real Phone 460

Phone Developer Power Tools 463

Application Verifi er 464

Performance Monitor 466

Performance Recorder 467

Summary 468

CHAPTER 22: UNIVERSAL APPS 469

Portable Class Library 470

Shared Projects 474

Universal Windows Apps 474

Summary 479

PART V: WEB APPLICATIONS 481

CHAPTER 23: ASP.NET WEB FORMS 483

Web Application Versus Web Site Projects 484

Creating Web Projects 485

Creating a Web Site Project 485

Creating a Web Application Project 489

Designing Web Forms 492

The HTML Designer 492

Positioning Controls and HTML Elements 495

Formatting Controls and HTML Elements 497

CSS Tools 499

Validation Tools 503

Web Controls 505

Navigation Components 505

User Authentication 506

Data Components 508

Data Source Controls 508

Data View Controls 510

Data Helper Controls 511

Web Parts 511

Master Pages 512

Rich Client-Side Development 514

Developing with JavaScript 514

Working with ASP.NET AJAX 516

Summary 518

CHAPTER 24: ASP.NET MVC 519

Model View Controller 520

Getting Started with ASP.NET MVC 521

Choosing a Model 524

Controllers and Action Methods 525

MVC Scaffolding 525

Rendering a UI with Views 528

Advanced MVC 536

Routing 536

Action Method Parameters 540

Model Binders 542

Areas 544

Validation 546

Partial Views 548

Dynamic Data Templates 549

Display Templates 549

Edit Templates 551

jQuery 552

ASP.NET MVC 6 (and ASP.NET 5) 554

Summary 558

CHAPTER 25: SILVERLIGHT 559

What Is Silverlight? 560

Getting Started with Silverlight 561

Navigation Framework 568

Theming 569

Enabling Running Out of Browser 571

Summary 575

CHAPTER 26: SHAREPOINT 577

SharePoint Execution Models 578

Farm Solution 578

Sandbox Solution 578

App Model 579

Preparing the Development Environment 580

Exploring SharePoint 2013 581

Creating a SharePoint Project 583

Building Custom SharePoint Components 587

Developing Web Parts 587

Creating Content Types and Lists 588

Adding Event Receivers 592

Creating SharePoint Workflows 593

Working with Features 595

Packaging and Deployment 596

Summary 599

CHAPTER 27: WINDOWS AZURE 601

The Windows Azure Platform 602

The Compute Emulator 604

Table, Blob, and Queue Storage 606

Application Deployment 610

SQL Azure 613

AppFabric 614

Service Bus 615

Access Control Service 615

Azure Mobile Services 615

Azure Websites 616

Azure Virtual Machines 616

Connectivity 617

Endpoints 617

Virtual Network 617

Summary 618

PART VI: DATA 619

CHAPTER 28: VISUAL DATABASE TOOLS 621

Database Windows in Visual Studio 2015 622

Server Explorer 623

Table Editing 625

Relationship Editing 626

Views, Stored Procedures, and Functions 627

The Data Sources Window 627

SQL Server Object Explorer 628

Editing Data 630

Summary 631

CHAPTER 29: DATASETS AND DATABINDING 633

DataSets Overview 634

Adding a Data Source 635

The DataSet Designer 636

Binding Data 639

BindingSource 641

BindingNavigator 644

Data Source Selections 647

Saving Changes 650

Inserting New Items 652

Validation 653

Customized DataSets 655

BindingSource Chains and the DataGridView 657

Working with Data Sources 659

The Web Service Data Source 661

Summary 663

CHAPTER 30: LANGUAGE INTEGRATED QUERIES (LINQ) 665

LINQ Providers 666

Old-School Queries 666

Query Pieces 669

From 669

Select 670

Where 671

Group By 671

Custom Projections 672

Order By 673

Debugging and Execution 674

LINQ to XML 675

VB XML Literals 677

Creating XML with LINQ 677

Expression Holes 678

Querying XML 680

Schema Support 681

LINQ to SQL 683

Creating the Object Model 683

Querying with LINQ to SQL 686

Inserts, Updates, and Deletes 687

Stored Procedures 688

Binding LINQ to SQL Objects 691

Summary 693

CHAPTER 31: THE ADO.NET ENTITY FRAMEWORK 695

What Is the Entity Framework? 696

Comparison with LINQ to SQL 696

Entity Framework Concepts 697

Getting Started 697

Creating an Entity Model 698

The Entity Data Model Wizard 698

The Entity Framework Designer 702

Creating/Modifying Entities 706

Changing Property Names 706

Adding Properties to an Entity 707

Creating Complex Types 708

Creating an Entity 708

Creating/Modifying Entity Associations 710

Entity Inheritance 711

Validating an Entity Model 711

Updating an Entity Model with Database Changes 712

Querying the Entity Model 712

LINQ to Entities Overview 713

Getting an Object Context 713

CRUD Operations 714

Data Retrieval 714

Saving Data 716

Navigating Entity Associations 718

Advanced Functionality 719

Updating a Database from an Entity Model 720

Adding Business Logic to Entities 720

Plain Old CLR Objects (POCO) 720

Summary 720

CHAPTER 32: REPORTING 721

Getting Started with Reporting 721

Designing Reports 723

Defining Data Sources 725

Reporting Controls 727

Text Box 727

Line/Rectangle 729

Table 729

Matrix 733

List 734

Image 735

Subreport 736

Chart 736

Gauge 738

Map 741

Data Bar 741

Sparkline 742

Indicator 743

Expressions, Placeholders, and Aggregates 743

Custom Code 747

Report Layout 751

Subreports 754

The Report Wizard 756

Rendering Reports 757

The Report Viewer Controls 757

Generating the Report 758

Rendering Reports to Different Formats 759

Deploying Reports 761

Summary 761

PART VII: APPLICATION SERVICES 763

CHAPTER 33: WINDOWS COMMUNICATION FOUNDATION (WCF) 765

What Is WCF? 766

Getting Started 766

Defining Contracts 767

Creating the Service Contract 768

Creating the Data Contract 770

Configuring WCF Service Endpoints 772

Hosting WCF Services 777

Consuming a WCF Service 782

Summary 787

CHAPTER 34: WINDOWS WORKFLOW FOUNDATION (WF) 789

What Is Windows Workflow Foundation? 790

Why Use Windows Workflow? 790

Workflow Concepts 791

Activities 791

Control Flow Activities 793

Expressions 793

Workflow Run Time/Scheduler 793

Bookmarks 793

Persistence 794

Tracking 794

Getting Started 795

The Workflow Foundation Designer 797

Creating a Workflow 801

Designing a Workflow 801

Writing Code Activities 804

Executing a Workflow 806

Debugging Workflows 808

Testing Workflows 809

Summary 809

CHAPTER 35: CLIENT APPLICATION SERVICES 811

Client Services 812

Role Authorization 815

User Authentication 817

Settings 819

Login Form 824

Offline Support 827

Summary 829

CHAPTER 36: SYNCHRONIZATION SERVICES 831

Occasionally Connected Applications 832

Server Direct 832

Getting Started with Synchronization Services 836

Synchronization Services over N-Tiers 840

Summary 841

PART VIII: CONFIGURATION AND RESOURCES 843

CHAPTER 37: CONFIGURATION FILES 845

.Config Files 845

Machine.Config 846

Web.Config 846

Transformations 846

App.Config 848

Security.Config 848

ApplicationHost.Config 848

Configuration Schema 849

Section: configurationSections 849

Section: startup 850

Section: runtime 850

Section: system.runtime.remoting 851

Section: system.net 851

Section: cryptographySettings 852

Section: system.diagnostics 852

Section: system.web 853

webServices 853

Section: compiler 854

Configuration Attributes 854

Application Settings 855

Using appSettings 855

Project Settings 856

Dynamic Properties 857

Custom Configuration Sections 859

IntelliSense 863

User Settings 864

Referenced Projects with Settings 865

Summary 867

CHAPTER 38: CONNECTION STRINGS 869

Connection String Wizard 869

SQL Server Format 875

In-Code Construction 877

Encrypting Connection Strings 878

LocalDB 881

Azure SQL Database 881

Summary 884

CHAPTER 39: RESOURCE FILES 885

What Are Resources? 885

Text File Resources 886

Resx Resource Files 887

Binary Resources 888

Adding Resources 888

Embedding Files as Resources 889

Naming Resources 890

Accessing Resources 890

Designer Files 891

Resourcing Your Application 892

Control Images 894

Satellite Resources 895

Cultures 895

Creating Culture Resources 895

Loading Culture Resource Files 896

Satellite Culture Resources 897

Accessing Specifi cs 897

Bitmap and Icon Loading 897

Cross-Assembly Referencing 898

ComponentResourceManager 898

Coding Resource Files 899

ResourceReader and ResourceWriter 900

ResxResourceReader and ResxResourceWriter 900

Custom Resources 901

Summary 904

PART IX: DEBUGGING 905

CHAPTER 40: USING THE DEBUGGING WINDOWS 907

The Code Window 907

Breakpoints 908

DataTips 908

The Breakpoints Window 908

The Output Window 909

The Immediate Window 910

The Watch Windows 912

QuickWatch 912

Watch Windows 1–4 913

Autos and Locals 913

The Code Execution Windows 913

Call Stack 914

Threads 914

Modules 915

Processes 915

The Memory Windows 916

Memory Windows 1–4 916

Disassembly 917

Registers 918

The Parallel Debugging Windows 918

Parallel Stacks 919

Parallel Tasks 921

Exceptions 921

Customizing the Exception Assistant 923

Summary 925

CHAPTER 41: DEBUGGING WITH BREAKPOINTS 927

Breakpoints 927

Setting a Breakpoint 928

Simple Breakpoints 928

Function Breakpoints 929

Address Breakpoint 930

Adding Break Conditions 930

Condition 930

Hit Count 932

Filter 932

Working with Breakpoints 933

Deleting Breakpoints 933

Disabling Breakpoints 933

Labeling Breakpoints 934

Import and Export of Breakpoints 935

Tracepoints 935

Creating a Tracepoint 935

Output Messages 936

Execution Control 936

Stepping through Code 936

Stepping Over (F10) 937

Stepping Into (F11) 937

Stepping Out (Shift+F11) 937

Step Filtering 937

Moving the Execution Point 938

Edit and Continue 938

Rude Edits 939

Stop Applying Changes 939

Summary 939

CHAPTER 42: DATATIPS, DEBUG PROXIES, AND VISUALIZERS 941

DataTips 942

Debugger Attributes 943

DebuggerBrowsable 943

DebuggerDisplay 944

DebuggerHidden 945

DebuggerStepThrough 946

DebuggerNonUserCode 947

DebuggerStepperBoundary 947

Type Proxies 947

Raw View 949

Visualizers 950

Advanced Techniques 953

Saving Changes to Your Object 953

Summary 955

CHAPTER 43: DEBUGGING WEB APPLICATIONS 957

Debugging Server-Side ASP.NET Code 958

Web Application Exceptions 960

Edit and Continue 962

Error Handling 962

Page-Level Errors 963

Application-Level Errors 963

Debugging Client-Side JavaScript 964

Setting Breakpoints in JavaScript Code 964

Debugging Dynamically Generated JavaScript 965

Debugging ASP.NET AJAX JavaScript 966

Tracing 967

Page-Level Tracing 967

Application-Level Tracing 968

Trace Output 969

The Trace Viewer 970

Custom Trace Output 970

Health Monitoring 970

Summary 972

CHAPTER 44: ADVANCED DEBUGGING TECHNIQUES 975

Start Actions 976

Debugging with Code 978

The Debugger Class 978

The Debug and Trace Classes 979

Debugging Running Applications 981

Attaching to a Windows Process 981

Attaching to a Web Application 982

Remote Debugging 983

Diagnostic Tools 985

IntelliTrace 985

Memory and CPU Usage 988

Code Map Debugging 990

Expanding the Code Map 991

Adding Notes 992

.NET Framework Source 993

Multithreaded and Parallelized Application Debugging 994

Debugging SQL Server Stored Procedures 995

Mixed-Mode Debugging 996

Postmortem Debugging 997

Generating Dump Files 997

Debugging Dump Files 998

Summary 1000

PART X: BUILD AND DEPLOYMENT 1001

CHAPTER 45: UPGRADING WITH VISUAL STUDIO 2015 1003

Upgrading from Recent Visual Studio Versions 1004

Upgrading to .NET Framework 4.6 1006

Summary 1008

CHAPTER 46: BUILD CUSTOMIZATION 1009

General Build Options 1009

Manual Dependencies 1012

The Visual Basic Compile Page 1013

Advanced Compiler Settings 1015

Optimizations 1015

Compilation Constants 1016

Build Events 1016

C# Build Pages 1018

MSBuild 1020

How Visual Studio Uses MSBuild 1020

The MSBuild Schema 1023

Items 1024

Properties 1024

Targets 1024

Tasks 1024

Assembly Versioning via MSBuild Tasks 1025

Summary 1026

CHAPTER 47: ASSEMBLY VERSIONING AND SIGNING 1027

Assembly Naming 1028

Version Consistency 1030

Strongly Named Assemblies 1032

The Global Assembly Cache 1032

Signing an Assembly 1033

Summary 1035

CHAPTER 48: OBFUSCATION, APPLICATION MONITORING, AND MANAGEMENT 1037

The IL Disassembler 1038

Decompilers 1039

Obfuscating Your Code 1041

Dotfuscator and Analytics 1041

Obfuscation Attributes 1046

ObfuscationAssemblyAttribute 1047

ObfuscationAttribute 1047

Words of Caution 1049

Reflection 1049

Strongly Named Assemblies 1049

Debugging with Delayed Signing 1050

Application Monitoring and Management 1051

Tamper Defense 1052

Application Instrumentation and Analytics 1053

Summary 1056

CHAPTER 49: PACKAGING AND DEPLOYMENT 1057

Windows Installer XML Toolset 1058

Building an Installer 1059

Using Heat to Create Fragments 1062

The Service Installer 1065

ClickOnce 1066

One Click to Deploy 1067

One Click to Update 1072

Summary 1074

CHAPTER 50: WEB APPLICATION DEPLOYMENT 1075

Web Deployment 1076

Publishing a Web Application 1076

Publishing to Azure 1078

Web Project Installers 1079

The Web Platform Installer 1081

Extending the Web Platform Installer 1082

Summary 1086

PART XI: CUSTOMIZING AND EXTENDING VISUAL STUDIO 1087

CHAPTER 51: THE AUTOMATION MODEL 1089

Visual Studio Extensibility Options 1090

The Visual Studio Automation Model 1090

An Overview of the Automation Model 1090

Solutions and Projects 1092

Windows and Documents 1093

Commands 1095

Debugger 1096

Events 1097

Summary 1097

CHAPTER 52: VSPACKAGES 1099

Developing a VSPackage Extension 1100

The VSPackage Wizard 1100

Project Structure 1104

Command Table File 1104

Handling Commands 1106

Testing Your Package 1106

Creating a Tool Window 1107

Deploying VSPackages 1110

Summary 1113

CHAPTER 53: MANAGED EXTENSIBILITY FRAMEWORK (MEF) 1115

Getting Started with MEF 1116

Imports and Exports 1118

Contracts 1119

Catalogs 1121

Advanced MEF 1122

The Visual Studio Editor 1123

The Text Model Subsystem 1123

The Text View Subsystem 1124

The Classification Subsystem 1125

The Operations Subsystem 1125

Extending the Editor 1125

Editor Extension Points 1126

Content Types 1127

Classification Types and Formats 1127

Margins 1128

Tags 1128

Adornments 1129

Mouse Processors 1129

Drop Handlers 1129

Editor Options 1129

IntelliSense 1130

Editor Services 1131

The Check Comment Highlighter Extension 1131

Summary 1138

PART XII: VISUAL STUDIO ENTERPRISE 1139

CHAPTER 54: VISUAL STUDIO ENTERPRISE FOR ARCHITECTS 1141

Modeling Projects 1142

UML Diagrams 1142

Use Case Diagrams 1143

Activity Diagrams 1143

Sequence Diagrams 1145

Component Diagrams 1147

Class Diagrams 1148

UML Model Explorer 1148

Using Layer Diagrams to Verify Application Architecture 1149

Linking to Team Foundation Server 1151

Exploring Code with Code Maps 1152

Summary 1154

CHAPTER 55: VISUAL STUDIO ENTERPRISE FOR DEVELOPERS 1155

Code Metrics 1156

Lines of Code 1156

Depth of Inheritance 1157

Class Coupling 1157

Cyclomatic Complexity 1158

Maintainability Index 1158

Excluded Code 1158

Code Analysis Tool 1158

C/C++ Code Analysis Tool 1159

Profiling Tools 1160

Configuring Profiler Sessions 1161

Reports 1162

Standalone Profiler 1163

IntelliTrace 1164

Database Tools 1167

Database Schemas 1167

SQL-CLR Support 1169

Database Refactoring 1171

Schema Compare 1172

Static Analysis 1173

Transact-SQL Editor 1174

Best Practices 1174

Summary 1175

CHAPTER 56: VISUAL STUDIO ENTERPRISE FOR TESTERS 1177

Automated Tests 1178

Web Performance Tests 1178

Load Tests 1181

Test Load Agent 1185

Coded UI Test 1185

Generic Tests 1186

Ordered Test 1187

Relating Code and Tests 1187

Code Coverage 1187

Visual Studio Test Management 1189

Microsoft Test Manager 1189

Testing Center 1190

Lab Center 1193

Summary 1194

CHAPTER 57: TEAM FOUNDATION SERVER 1195

Team Project 1196

Process Templates 1197

Work Item Tracking 1200

Work Item Queries 1200

Work Item Types 1202

Adding Work Items 1202

Work Item State 1203

Excel and Project Integration 1203

Excel 1204

Project 1205

Version Control 1206

Working from Solution Explorer 1206

Check Out 1207

Check In 1207

Resolve Conflicts 1209

Working Offline 1210

Label 1211

History 1212

Annotate 1213

Shelve 1213

Branch 1214

Merge 1215

Team Foundation Build 1215

Reporting and Business Intelligence 1218

Team Portal 1219

Summary 1219

INDEX 1221

loading