Professional Visual Studio 2017 - Bruce Johnson - E-Book

Professional Visual Studio 2017 E-Book

Bruce Johnson

0,0
41,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

Skip the basics and delve right into Visual Studio 2017 advanced features and tools Professional Visual Studio 2017 is the industry-favorite guide to getting the most out of Microsoft's primary programming technology. From touring the new UI to exploiting advanced functionality, this book is designed to help professional developers become more productive. A unique IDE-centric approach provides a clear path through the typical workflow while exploring the nooks and crannies that can make your job easier. Visual Studio 2017 includes a host of features aimed at improving developer productivity and UI, and this book covers them all with clear explanation, new figures, and expert insight. Whether you're new to VS or just upgrading, this all-inclusive guide is an essential resource to keep within arm's reach. Visual Studio 2017 fixes the crucial issues that kept professionals from adopting VS 2015, and includes new features and tools that streamline the developer's job. This book provides the straightforward answers you need so you can get up to speed quickly and get back to work. * Master the core functionality of Visual Studio 2017 * Dig into the tools that make writing code easier * Tailor the environment to your workflow, not the other way around * Work your way through configuration, debugging, building, deployment, customizing, and more Microsoft is changing their release cadence--it's only been about two years since the last release--so developers need to quickly get a handle on new tools and features if they hope to remain productive. The 2017 release is designed specifically to help you get more done, in less time, with greater accuracy and attention to detail. If you're ready to get acquainted, Professional Visual Studio 2017 is your ideal guide.

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

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1052

Veröffentlichungsjahr: 2017

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.



TABLE OF CONTENTS

COVER

TITLE PAGE

INTRODUCTION

WHO THIS BOOK IS FOR

WHAT THIS BOOK COVERS

HOW THIS BOOK IS STRUCTURED

WHAT YOU NEED TO USE THIS BOOK

CONVENTIONS

SOURCE CODE

ERRATA

P2P.WROX.COM

PART I: Integrated Development Environment

1 A Quick Tour

GETTING STARTED

THE VISUAL STUDIO IDE

SUMMARY

2 The Solution Explorer, Toolbox, and Properties

THE SOLUTION EXPLORER

THE TOOLBOX

PROPERTIES

SUMMARY

3 Options and Customizations

THE START PAGE

WINDOW LAYOUT

THE EDITOR SPACE

OTHER OPTIONS

IMPORTING AND EXPORTING SETTINGS

SUMMARY

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

SUMMARY

5 Find and Replace and Help

QUICK FIND/REPLACE

FIND/REPLACE IN FILES

ACCESSING HELP

SUMMARY

PART II: Getting Started

6 Solutions, Projects, and Items

SOLUTION STRUCTURE

SOLUTION FILE FORMAT

SOLUTION PROPERTIES

PROJECT TYPES

PROJECT FILES FORMAT

PROJECT PROPERTIES

C/C++ CODE ANALYSIS TOOL

WEB APPLICATION PROJECT PROPERTIES

WEB SITE PROJECTS

NUGET PACKAGES

SUMMARY

7 IntelliSense and Bookmarks

INTELLISENSE EXPLAINED

JAVASCRIPT INTELLISENSE

XAML INTELLISENSE

INTELLISENSE OPTIONS

EXTENDED INTELLISENSE

BOOKMARKS AND THE BOOKMARK WINDOW

SUMMARY

8 Code Snippets and Refactoring

CODE SNIPPETS REVEALED

ACCESSING REFACTORING SUPPORT

REFACTORING ACTIONS

SUMMARY

9 Server Explorer

SERVER CONNECTIONS

DATA CONNECTIONS

SHAREPOINT CONNECTIONS

SUMMARY

PART III: Digging Deeper

10 Unit Testing

YOUR FIRST TEST CASE

ASSERTING THE FACTS

INITIALIZING AND CLEANING UP

TESTING CONTEXT

LIVE UNIT TESTING

ADVANCED UNIT TESTING

INTELLITEST

SUMMARY

11 Project and Item Templates

CREATING TEMPLATES

EXTENDING TEMPLATES

STARTER KITS

ONLINE TEMPLATES

SUMMARY

12 Managing Your Source Code

SOURCE CONTROL

SUMMARY

PART IV: Desktop Applications

13 Windows Forms Applications

GETTING STARTED

THE WINDOWS FORM

FORM DESIGN PREFERENCES

ADDING AND POSITIONING CONTROLS

CONTAINER CONTROLS

DOCKING AND ANCHORING CONTROLS

SUMMARY

14 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

15 Universal Windows Platform Apps

WHAT IS A WINDOWS APP?

CREATING A WINDOWS APP

WINDOWS RUNTIME COMPONENTS

.NET NATIVE COMPILATION

SUMMARY

PART V: Web Applications

16 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

17 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

18 .NET Core

WHAT IS .NET CORE?

WORKING WITH ASP.NET CORE

NUGET PACKAGE MANAGER

BOWER PACKAGE MANAGER

SUMMARY

19 Node.js Development

GETTING STARTED WITH NODE.JS

NODE PACKAGE MANAGER

TASK RUNNER EXPLORER

SUMMARY

20 Python Development

GETTING STARTED WITH PYTHON

COOKIECUTTER EXTENSION

SUMMARY

PART VI: Mobile Applications

21 Mobile Applications Using .NET

USING XAMARIN

CREATING A XAMARIN FORMS PROJECT

DEBUGGING YOUR APPLICATION

SUMMARY

22 Mobile Applications Using JavaScript

WHAT IS APACHE CORDOVA?

CREATING AN APACHE CORDOVA PROJECT

DEBUGGING IN APACHE CORDOVA

SUMMARY

PART VII: Cloud Services

23 Windows Azure

THE WINDOWS AZURE PLATFORM

SQL AZURE

SERVICE FABRIC

AZURE MOBILE APP

AZURE VIRTUAL MACHINES

SUMMARY

24 Synchronization Services

OCCASIONALLY CONNECTED APPLICATIONS

SERVER DIRECT

GETTING STARTED WITH SYNCHRONIZATION SERVICES

SYNCHRONIZATION SERVICES OVER N-TIERS

SUMMARY

25 SharePoint

SHAREPOINT EXECUTION MODELS

PREPARING THE DEVELOPMENT ENVIRONMENT

CREATING A SHAREPOINT PROJECT

RUNNING YOUR APPLICATION

SUMMARY

PART VIII: Data

26 Visual Database Tools

DATABASE WINDOWS IN VISUAL STUDIO 2017

EDITING DATA

REDGATE DATA TOOLS

SUMMARY

27 The ADO.NET Entity Framework

WHAT IS THE ENTITY FRAMEWORK?

GETTING STARTED

CREATING AN ENTITY MODEL

QUERYING THE ENTITY MODEL

ADVANCED FUNCTIONALITY

SUMMARY

28 Data Warehouses and Lakes

WHAT IS APACHE HADOOP?

DATA LAKE TOOLS FOR VISUAL STUDIO

SUMMARY

29 Data Science and Analytics

WHAT IS R?

R TOOLS FOR VISUAL STUDIO

SUMMARY

PART IX: Debugging

30 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

THE PARALLEL DEBUGGING WINDOWS

EXCEPTIONS

SUMMARY

31 Debugging with Breakpoints

BREAKPOINTS

TRACEPOINTS

EXECUTION CONTROL

EDIT AND CONTINUE

SUMMARY

PART X: Build And Deployment

32 Upgrading with Visual Studio 2017

UPGRADING FROM RECENT VISUAL STUDIO VERSIONS

UPGRADING TO .NET FRAMEWORK 4.6.2

SUMMARY

33 Build Customization

GENERAL BUILD OPTIONS

MANUAL DEPENDENCIES

THE VISUAL BASIC COMPILE PAGE

C# BUILD PAGES

MSBUILD

SUMMARY

34 Obfuscation, Application Monitoring, and Management

THE IL DISASSEMBLER

DECOMPILERS

OBFUSCATING YOUR CODE

APPLICATION MONITORING AND MANAGEMENT

SUMMARY

35 Packaging and Deployment

WINDOWS INSTALLER XML TOOLSET

CLICKONCE

SUMMARY

36 Web Application Deployment

WEB DEPLOYMENT

WEB PROJECT INSTALLERS

THE WEB PLATFORM INSTALLER

SUMMARY

37 Continuous Delivery

NOMENCLATURE

CONTINUOUS DELIVERY TOOLS

SUMMARY

PART XI: Visual Studio Editions

38 Visual Studio Enterprise: Code Quality

DEPENDENCY VERIFICATION

EXPLORING CODE WITH CODE MAPS

CODE CLONING

SUMMARY

39 Visual Studio Enterprise: Testing and Debugging

AUTOMATED TESTS

INTELLITRACE

INTELLITEST

SUMMARY

40 Visual Studio Team Services

GETTING STARTED WITH GIT

VERSION CONTROL

WORK ITEM TRACKING

BUILDS

WEB PORTAL

SUMMARY

END USER LICENSE AGREEMENT

List of Tables

Chapter 7

TABLE 7-1

: IntelliSense Commands

Chapter 8

TABLE 8-1

:  Information Panes for Snippets

Chapter 9

TABLE 9-1

: Values for DefaultSwitch

Chapter 11

TABLE 11-1

:  Template Parameters

Chapter 32

TABLE 32-1

:  Compatible Project Types

Chapter 39

TABLE 39-1

: IntelliTrace Data Collection Types

List of Illustrations

Chapter 1

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

Chapter 2

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 2-17

FIGURE 2-18

FIGURE 2-19

FIGURE 2-20

FIGURE 2-21

FIGURE 2-22

FIGURE 2-23

FIGURE 2-24

Chapter 3

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 3-24

FIGURE 3-25

Chapter 4

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

Chapter 5

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

Chapter 6

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 6-28

FIGURE 6-29

FIGURE 6-30

Chapter 7

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

Chapter 8

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 8-18

FIGURE 8-19

FIGURE 8-20

FIGURE 8-21

Chapter 9

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

Chapter 10

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 10-10

FIGURE 10-11

FIGURE 10-12

FIGURE 10-13

FIGURE 10-14

FIGURE 10-15

Chapter 11

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

Chapter 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

Chapter 13

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 13-14

FIGURE 13-15

FIGURE 13-16

FIGURE 13-17

FIGURE 13-18

Chapter 14

FIGURE 14-1

FIGURE 14-2

FIGURE 14-3

FIGURE 14-4

FIGURE 14-5

FIGURE 14-6

FIGURE 14-7

FIGURE 14-8

FIGURE 14-9

FIGURE 14-10

FIGURE 14-11

FIGURE 14-12

FIGURE 14-13

FIGURE 14-14

FIGURE 14-15

FIGURE 14-16

FIGURE 14-17

FIGURE 14-18

FIGURE 14-19

FIGURE 14-20

FIGURE 14-21

FIGURE 14-22

FIGURE 14-23

FIGURE 14-24

FIGURE 14-25

FIGURE 14-26

FIGURE 14-27

FIGURE 14-28

FIGURE 14-29

FIGURE 14-30

FIGURE 14-31

FIGURE 14-32

FIGURE 14-33

FIGURE 14-34

Chapter 15

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

Chapter 16

FIGURE 16-1

FIGURE 16-2

FIGURE 16-3

FIGURE 16-4

FIGURE 16-5

FIGURE 16-6

FIGURE 16-7

FIGURE 16-8

FIGURE 16-9

FIGURE 16-10

FIGURE 16-11

FIGURE 16-12

FIGURE 16-13

FIGURE 16-14

FIGURE 16-15

FIGURE 16-16

FIGURE 16-17

FIGURE 16-18

FIGURE 16-19

FIGURE 16-20

FIGURE 16-21

FIGURE 16-22

FIGURE 16-23

FIGURE 16-24

FIGURE 16-25

FIGURE 16-26

FIGURE 16-27

FIGURE 16-28

FIGURE 16-29

FIGURE 16-30

FIGURE 16-31

FIGURE 16-32

FIGURE 16-33

FIGURE 16-34

FIGURE 16-35

FIGURE 16-36

Chapter 17

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

Chapter 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

Chapter 19

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

Chapter 20

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

Chapter 21

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

Chapter 22

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

Chapter 23

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 23-12

FIGURE 23-13

Chapter 24

FIGURE 24-1

FIGURE 24-2

FIGURE 24-3

FIGURE 24-4

Chapter 25

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

Chapter 26

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 26-13

FIGURE 26-14

FIGURE 26-15

FIGURE 26-16

FIGURE 26-17

FIGURE 26-18

FIGURE 26-19

FIGURE 26-20

FIGURE 26-21

FIGURE 26-22

Chapter 27

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 27-11

FIGURE 27-12

FIGURE 27-13

Chapter 28

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

Chapter 29

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

Chapter 30

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 30-14

FIGURE 30-15

FIGURE 30-16

FIGURE 30-17

FIGURE 30-18

FIGURE 30-19

FIGURE 30-20

FIGURE 30-21

Chapter 31

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

Chapter 32

FIGURE 32-1

FIGURE 32-2

Chapter 33

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

Chapter 34

FIGURE 34-1

FIGURE 34-2

FIGURE 34-3

FIGURE 34-4

FIGURE 34-5

FIGURE 34-6

FIGURE 34-7

FIGURE 34-8

FIGURE 34-9

FIGURE 34-10

FIGURE 34-11

Chapter 35

FIGURE 35-1

FIGURE 35-2

FIGURE 35-3

FIGURE 35-4

FIGURE 35-5

FIGURE 35-6

FIGURE 35-7

FIGURE 35-8

FIGURE 35-9

FIGURE 35-10

FIGURE 35-11

FIGURE 35-12

Chapter 36

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

Chapter 37

FIGURE 37-1

FIGURE 37-2

FIGURE 37-3

FIGURE 37-4

FIGURE 37-5

FIGURE 37-6

FIGURE 37-7

FIGURE 37-8

FIGURE 37-9

FIGURE 37-10

Chapter 38

FIGURE 38-1

FIGURE 38-2

FIGURE 38-3

FIGURE 38-4

FIGURE 38-5

FIGURE 38-6

FIGURE 38-7

FIGURE 38-8

FIGURE 38-9

FIGURE 38-10

FIGURE 38-11

Chapter 39

FIGURE 39-1

FIGURE 39-2

FIGURE 39-3

FIGURE 39-4

FIGURE 39-5

FIGURE 39-6

FIGURE 39-7

FIGURE 39-8

FIGURE 39-9

FIGURE 39-10

FIGURE 39-11

FIGURE 39-12

FIGURE 39-13

FIGURE 39-14

Chapter 40

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

Guide

Cover

Table of Contents

Begin Reading

Pages

C1

v

vi

vii

ix

xi

xiii

xxxi

xxxii

xxxiii

xxxiv

xxxv

xxxvi

xxxvii

1

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

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

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

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

115

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

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

203

204

205

206

207

208

209

210

211

212

213

214

215

217

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

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

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

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

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

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

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

449

450

451

452

453

454

455

456

457

459

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

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

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

549

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

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

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

645

646

647

648

649

650

651

652

653

654

655

656

657

659

661

662

663

664

665

666

667

669

670

671

672

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

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

725

726

727

728

729

730

731

732

733

734

735

736

737

738

739

741

742

743

744

745

746

747

748

749

750

751

753

754

755

756

757

758

759

760

761

762

763

764

765

766

767

768

769

770

771

772

773

774

775

777

778

779

780

781

782

783

784

785

786

787

788

789

790

E1

PROFESSIONALVisual Studio® 2017

 

 

 

Bruce Johnson

 

 

 

 

 

 

INTRODUCTION

AS A TOOL FOR DEVELOPERS, Visual Studio stands head and shoulders about its competition. The team responsible for developing Visual Studio has always put the productivity of people who code for a living at the top of their priority list. This version continues this tradition. Visual Studio always incorporates the latest advances in Microsoft's premier programming languages (Visual Basic and C#), as well as adding little tidbits of functionality that are a boon to coders. But at a higher level, Visual Studio 2017 embraces open-source, mobile development, and cloud computing in a variety of ways. Azure is continually introducing new features and products and Visual Studio 2017 integrates seamlessly with them. While, in theory, it is possible to create any .NET application using tools as simple as Notepad and a command-line window, the typical developer would never think to do so. Visual Studio 2017, as was the case with its predecessors, includes a host of improvements and features that are aimed at making the life of a developer easier.

Visual Studio 2017 is an enormous product no matter which way you look at it. It can be intimidating to newcomers and difficult for even experienced .NET developers to find what they need. And that's where this book comes in. Professional Visual Studio 2017 looks at every major aspect of this developer tool, showing you how to harness each feature and offering advice about how best to utilize the various components effectively. It shows you the building blocks that make up Visual Studio 2017, breaking the user interface down into manageable chunks for you to understand. It then expands on each of these components with additional details about exactly how they work, both in isolation and in conjunction with other parts of Visual Studio 2017, along with tools that are not included in the out-of-the-box product, to make your development efforts even more efficient.

WHO THIS BOOK IS FOR

Professional Visual Studio 2017 is for developers who are new to Visual Studio as well as those programmers who have some experience but want to learn about features they may have previously overlooked.

Even if you are familiar with the way previous versions of Visual Studio worked, you may want to at least skim over Part I. These chapters deal with the basic constructs that make up the user interface. The biggest changes to the building blocks are in the installation process. It is more granular, meaning that you install only what you need and if you don't install a component initially, the installer is only a click or two away. But there are some little additions in functionality, so while you can get by without Part I, some of the changes in Visual Studio 2017 can make you a more efficient developer. And, after all, that's what you're looking to get out of this book.

If you're just starting out, you'll greatly benefit from the first part, where basic concepts are explained and you're introduced to the user interface and how to customize it to suit your own style.

WHAT THIS BOOK COVERS

Microsoft Visual Studio 2017 is arguably the most advanced integrated development environment (IDE) available for programmers today. It is based on a long history of programming languages and interfaces and has been influenced by many different variations on the theme of development environments.

Visual Studio 2017 does not represent a major departure from recent versions. Still, regardless of the type of application you're creating, there are tweaks that have been made—some small, some less so (.NET Core, for example). Familiarity with the changes helps you perform your job better. For this reason, as well as to help newcomers to Visual Studio, this book covers the breadth of the product. Along the way, you will become more familiar and comfortable with the interface.

Visual Studio 2017 comes in several versions: Community, Professional, and Enterprise. The majority of this book deals with the Professional Edition of Visual Studio 2017, but some chapters utilize features found only in the Enterprise edition. If you haven't used this edition before, read through Chapters 38 and 39 for an overview of the features it offers over and above the Professional Edition.

HOW THIS BOOK IS STRUCTURED

This book is divided into 11 parts:

Integrated Development Environment:

This book's first five chapters are dedicated to familiarizing you with the core aspects of Visual Studio 2017, from the IDE structure and layout to the various options and settings you can change to make the user interface synchronize with your own way of doing things.

Getting Started:

In this part, you learn how to take control of your projects and how to organize them in ways that work with your own style.

Digging Deeper:

Though the many graphical components of Visual Studio that make a programmer's job easier are discussed in many places throughout this book, you often need help when you're in the process of actually writing code. This part deals with features that support the coding of applications such as IntelliSense, code refactoring, and creating and running unit tests.

Desktop Applications:

Rich client applications have seen quite a transition within the .NET Framework, moving from Windows Forms applications to Windows Presentation Foundation (WPF) to Universal Windows Applications. Each of these gets its own chapter in this part.

Web Applications:

Web applications have seen even more transitions that Desktop applications. And just like Desktop applications, each of the three different development styles (ASP.NET Web Forms, ASP.NET MVC, and .NET Core) gets its own chapter. And a couple of new kids on the block, Node.js and Python, are also included in this part.

Mobile Applications:

There are two different styles of mobile application development that are supported with Visual Studio 2017. Through Xamarin, it's possible to create mobile apps using familiar .NET components. And by using Apache Cordova (formerly PhoneGap), you can target mobile devices using HTML, CSS, and JavaScript.

Cloud Services:

Visual Studio 2017 supports the cloud in a wide variety of ways. The chapter on Windows Azure looks at how some of the newer features of Azure are integrated into Visual Studio. And the use of synchronization services as a data storage platform is examined, along with how to create apps for SharePoint.

Data:

A large proportion of applications use some form of data storage. Visual Studio 2017 and the .NET Framework include strong support for working with databases and other data sources. This part examines how to the Visual Database Tools, and ADO.NET Entity Framework to build applications that work with data. It also shows you how you how to take advantage of a couple of new functions within Azure to support data warehouse construction and data analytics.

Debugging:

Application debugging is one of the more challenging tasks developers have to tackle, but correct use of the Visual Studio 2017 debugging features will help you analyze the state of the application and determine the cause of any bugs. This part examines the debugging support provided by the IDE.

Build and Deployment:

In addition to discussing how to build your solutions effectively and get applications into the hands of your end users, this part also deals with the process of upgrading your projects from previous versions.

Visual Studio Editions:

The final part of the book examines the additional features only available in the Enterprise version of Visual Studio 2017. In addition, you'll also learn how Visual Studio Team Services provides an essential tool for managing software projects.

Though this breakdown of the Visual Studio feature set provides the most logical and easily understood set of topics, you may need to look for specific functions that will aid you in a particular activity. To address this need, references to appropriate chapters are provided whenever a feature is covered in more detail elsewhere in the book.

As Visual Studio has grown over the years, the size of earlier versions of this book had grown to the point where it was unwieldy. And there were even more features with Visual Studio 2017. So to avoid a book whose size would be pushing 2,000 pages, we took a number of the chapters from earlier editions of Visual Studio and put them into an online archive. These chapters contain features that have not been changed or enhanced in Visual Studio 2017. As such, the instructions found therein will apply, in general, if you're trying to use them in Visual Studio 2017. You can find the online archive on www.wrox.com.

WHAT YOU NEED TO USE THIS BOOK

To use this book effectively, you'll need only one additional item — Microsoft Visual Studio 2017 Professional Edition. With this software installed and the information found in this book, you'll be able to get a handle on how to use Visual Studio 2017 effectively in a very short period of time. In order to be able to follow along with all of the examples in the book, you'll want to be sure to install the following workloads during your Visual Studio 2017 installation (as discussed in Chapter 1):

Universal Windows Platform

.NET desktop development

ASP.NET and web development

Azure development

Node.js development

Data storage and processing

Data science and analytical applications

Mobile development with .NET

Mobile development with Javascript

.NET code cross-platform development

This book assumes that you are familiar with the traditional programming model, and it uses both the C# and Visual Basic (VB) languages to illustrate features within Visual Studio 2017. In addition, it is assumed that you can understand the code listings without an explanation of basic programming concepts in either language. If you're new to programming and want to learn Visual Basic, please take a look at Beginning Visual Basic 2015 by Bryan Newsome. Similarly, if you are after a great book on C#, track down Beginning C# 6 Programming with Visual Studio 2015 by Benjamin Perkins, Jacob Vibe Hammer, and Jon D. Reid.

Some chapters discuss additional products and tools that work in conjunction with Visual Studio. The following are all available to download either on a trial basis or for free:

Code Snippet Editor:

This is a third-party tool developed for creating code snippets in VB. The Snippet Editor tool is discussed in

Chapter 8

.

SQL Server 2016:

The installation of Visual Studio 2017 includes an install of SQL Server 2016 Express, enabling you to build applications that use database files. However, for more comprehensive enterprise solutions, you can use a full SQL Server 2016 instead.

Visual Studio 2017 Enterprise Edition:

This more advanced version of Visual Studio introduces tools for other parts of the development process such as testing and design. They are discussed in

Chapters 38

-

39

.

Team Foundation Server or Team Foundation Service:

The server product (or the cloud-based equivalent) that provides application lifecycle management throughout Visual Studio 2017. This is covered in

Chapter 40

.

Windows 7, Windows 8, or Windows 10:

Visual Studio 2015 is compatible with Windows 7 SP1, and 8.1, and, of course, Windows 10. It can produce applications that run on Windows XP, Windows Vista, Windows 7, Windows 8, and Windows 10.

CONVENTIONS

To help you get the most from the text and keep track of what's happening, we've used a number of conventions throughout the book.

WARNING

Boxes like this one hold important, not-to-be forgotten information that is directly relevant to the surrounding text.

NOTE

Notes, tips, hints, tricks, and asides to the current discussion are offset and placed in italics like this.

As for styles in the text:

We

highlight

new terms and important words when we introduce them.

We show URLs and code within the text like so:

persistence.properties

.

We present code in the following way:

We use a monofont type for code examples.

We use bold to emphasize code that is particularly important in the present context or to show changes from a previous code snippet.

SOURCE CODE

As you work through the examples in this book, you may choose either to type in all the code manually or to use the source code files that accompany the book. All the source code used in this book is available for download at www.wrox.com.

You can also search for the book at www.wrox.com by ISBN (the ISBN for this book is 978-1-119-40458-3) to find the code. And a complete list of code downloads for all current Wrox books is available at www.wrox.com/dynamic/books/download.aspx.

NOTE

Because many books have similar titles, you may find it easiest to search by ISBN; this book's ISBN is 978-1-119-40458-3.

Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.

Most of the code on www.wrox.com is compressed in a .ZIP, .RAR archive, or similar archive format appropriate to the platform. Once you download the code, just decompress it with your favorite compression tool.

ERRATA

We make every effort to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or faulty piece of code, we would be very grateful for your feedback. By sending in errata you may save another reader hours of frustration and at the same time you will be helping us provide even higher quality information.

To find the errata page for this book, go to www.wrox.com and locate the title using the Search box or one of the title lists. Then, on the Book Search Results page, click the Errata link. On this page you can view all errata that has been submitted for this book and posted by Wrox editors.

NOTE

a complete book list including links to errata is also available atwww.wrox.com/misc-pages/booklist.shtml.

If you don't spot “your” error on the Errata page, click the Errata Form link and complete the form to send us the error you have found. We'll check the information and, if appropriate, post a message to the book's errata page and fix the problem in subsequent editions of the book.

P2P.WROX.COM

For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a web-based system for you to post messages relating to Wrox books and related technologies and interact with other readers and technology users. The forums offer a subscription feature to email you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.

At http://p2p.wrox.com you will find a number of different forums that will help you, not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:

Go to

p2p.wrox.com

and click the Register link.

Read the terms of use and click Agree.

Complete the required information to join as well as any optional information you wish to provide and click Submit.

You will receive an e-mail with information describing how to verify your account and complete the joining process.

NOTE

You can read messages in the forums without joining P2P but in order to post your own messages, you must join.

Once you join, you can post new messages and respond to messages other users post. You can read messages at any time on the Web. If you would like to have new messages from a particular forum emailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.

For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.

PART IIntegrated Development Environment

 

CHAPTER 1:

A Quick Tour

CHAPTER 2:

The Solution Explorer, Toolbox, and Properties

CHAPTER 3:

Options and Customizations

CHAPTER 4:

The Visual Studio Workspace

CHAPTER 5:

Find and Replace and Help

1A Quick Tour

WHAT’S IN THIS CHAPTER?

What’s in This Chapter?

Installing and getting started with Visual Studio 2017

Creating and running your first application

Debugging 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 2017 is the next iteration in the continual evolution of a best-of-breed integrated development environment (IDE).

This chapter introduces the Visual Studio 2017 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

Recent versions of Visual Studio have seen incremental improvements in the installation experience. However, Visual Studio 2017 has pretty much completely revamped the installation options and workflow. It has been designed to not only get you up and running quickly, but also to easily select only those options you need to have installed. This section walks you through the installation process and getting started with the IDE.

Installing Visual Studio 2017

The installer for Visual Studio 2017 is what Microsoft calls a “low-impact installer.” The idea arose as Microsoft compared the footprint used by Visual Studio 2015 with the kinds of experiences that users were not only requesting, but also using. As surprising as it might seem, not every developer needs to have Visual Studio support for Windows Forms, ASP.NET, WPF, Universal Apps, and C++ out of the box.

Visual Studio 2015 and earlier versions were optimized so that pressing F5 to run a program would work out of the box. It wasn’t expected that you would need to install any other components in order to get the large majority of .NET applications running. While this was a definite plus regarding ease of use, it made for a large (some might say bloated) footprint for Visual Studio.

In Visual Studio 2017, the installation process takes a different point of view. Instead of automatically installing “everything,” you get to pick and choose the different components that you want to install. Yes, you had a little bit of that in the past, but now the number of options that you have is greatly increased. However, more options doesn’t necessarily mean a better installation experience. In fact, it’s probably the opposite, as you try to figure out which of a hundred different options you need to install to work on your project. To address that challenge, the Visual Studio 2017 installer uses the concept of workloads.

When you launch the Visual Studio 2017 installation process (an application of only a couple of megabytes in size), you’ll see the dialog in Figure 1-1 appear relatively quickly. Naturally, this is after you have read (in great detail, of course) and accepted the licensing information and privacy statements.

FIGURE 1-1

This is the main hub for the installer and the location where the desired components are specified. There are two modes for identifying the components. In Figure 1-1, you are looking at the workloads. The workloads have been divided into five different categories. To include a workload in the installation, simply click on it, showing a blue checkbox in the top right corner. You can add any number of the workloads as part of the installation. The available workloads are:

Universal Windows Platform development:

Used if you are creating applications for the Universal Windows Platform, regardless of your language of choice.

.NET desktop development:

Allows you to create applications, using either WPF or Windows Forms. This is also where you find the Console application template.

Desktop development with C++:

Used to build classic Windows-based applications. This option is appropriate if you expect to be using Visual C++, the Active Template Library (ATL), or Microsoft Foundation Classes (MFC).

ASP.NET and web development:

Adds the components used to build web applications, including ASP.NET, ASP.NET Core, and plain old HTML/Javascript/CSS.

Azure development:

Includes the Azure SDK, tools, and project templates that allow you to create Azure-based cloud applications.

Python development:

Includes support for cookiecutter, Python 3, and tools that are used to interact with Azure. And, optionally, you can include other distributions of Python, such as Anaconda.

Node.js development:

One of the new tools supported by Visual Studio 2017, this workload includes the components that allow you to create network applications using the Node.js platform.

Data storage and processing:

Some recent additions to the Azure platform include Azure Data Lake, Hadoop, and Azure ML (Machine Learning). This workload includes the templates and tools to develop applications for this platform, along with the Azure SQL Server database.

Data science and analytical applications:

Brings together three languages that are also found in other workloads: R, Python, and F#. These tools can be used to build a wide variety of analytics-based applications.

Office/SharePoint development:

Used to create a wide variety of Office and SharePoint applications, including Office add-ins, SharePoint solutions, and Visual Studio Tools for Office (VSTO) add-ins.

Mobile development with .NET:

One of the three technologies that Visual Studio 2017 supports for mobile development, this workload allows you to create iOS, Android, or Windows applications using Xamarin.

Mobile development with JavaScript:

Similar concept to the previous entry, but instead of using Xamarin, your applications are developed using Tools for Apache Cordova and JavaScript.

Mobile development with C++:

And the last of the three mobile development environments allows you to create iOS, Android, and Windows applications using C++.

Game development with Unity:

Unity is a broadly used and very flexible cross-platform game development environment. This workload allows you to create 2D and 3D games using the Unity framework.

Game development with C++:

Supports the creation of games using C++ along with libraries like DirectX, Unreal, or Cocos2d.

Visual Studio extension development:

Lets you create add-ons and extensions for use in Visual Studio. Included in this are code analyzers and tool windows that take advantage of the Roslyn compiler functionality.

Linux development with C++:

Windows 10 includes an option to install an Ubuntu-based Linux Bash shell. This workload includes the set of tools and libraries that allow you to create applications that run in Linux using Visual Studio.

.NET Core cross-platform development:

.NET Core is a popular approach to cross-platform development. This workload allows you to create .NET Core applications, including web applications.

WORKLOADS USED IN THIS BOOK

In order to work through the examples in the book, there are a number of workloads that need to be installed. Specifically:

Universal Windows Platform

.NET desktop development

ASP.NET and web development

Azure development

Node.js development

Data storage and processing

Data science and analytical applications

Mobile development with .NET

Mobile development with Javascript

.NET code cross-platform development

The second mode for choosing components is more granular. If you select the Individual Components link at the top of the installation screen, the list of components shown in Figure 1-2 appears. From here you can select any or all of the individual components that you want to install on your machine.

FIGURE 1-2

NOTE

To see the relationship between the workloads and the more granular components that are included, simply select a workload. A list of the components that are included appears in the pane on the right side of the dialog.

The third installation option you have for Visual Studio is to include one or more of the supported language packs. Clicking on the Language Packs link displays the list of language packs that are available (see Figure 1-3).

FIGURE 1-3

Once you have selected your components (either individually or as part of a workload), choose the installation location and click on Install. Now comes the longer part of the process. You’ll see the progress dialog, an example of which is shown in Figure 1-4. Depending on which components you already have installed on your computer, you might be prompted to restart your computer midway through or at the end of the installation process. When all the components have been successfully installed, the original dialog changes slightly (as shown in Figure 1-5). This final dialog is also the starting point for adding features to Visual Studio in the future.

FIGURE 1-4

FIGURE 1-5

Running Visual Studio 2017

The first time you run Visual Studio 2017, you might be given the opportunity to sign in. If you had already signed in from within Visual Studio 2015, you won’t be prompted to log in. Your credentials are remembered between the versions. However, if you’re new to Visual Studio, then you’ll be asked to provide a Microsoft Live account.

This behavior is part of an effort to cloud-enable Visual Studio—to connect Visual Studio settings and functionality to assets that are available across the Internet. There is no requirement for you to log in. The login page includes a Not Now, Maybe Later link. Clicking on that link skips a number of steps and lets you get to Visual Studio quickly. But there are some decent benefits that can be derived by signing in.

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 2017 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.

As part of the cloud enabling, you see your name (assuming that you logged in) in the top right of the IDE. If you click on the drop-down arrow (shown in Figure 1-6), you can see an Account Settings link. Clicking on that link takes you to a dialog (see Figure 1-7) in which you can manage the details of your account, including associating Visual Studio with different accounts.

FIGURE 1-6

FIGURE 1-7

Along with providing a mechanism for editing the basic contact information for the profile, the dialog includes a list of the Microsoft Live accounts that have been “remembered” on your current machine.

THE VISUAL STUDIO IDE

The first time you launch Visual Studio 2017 , you will most likely see a dialog indicating that Visual Studio is configuring the development environment. When this process is complete, Visual Studio 2017 opens, ready for you to start working, as shown in Figure 1-8.

FIGURE 1-8

You’ll see the Start page in the center of the screen. The bulk of the page contains links to the most common functions that you’re likely to perform. For example, there is a list of Recent projects, along with links that allow you to open existing projects or create a new project. And in the latter case, the most commonly used templates are prominently on display. The previous version of the Start page included a news feed of interest to developers, and that feed is still present in Visual Studio 2017. And in the top left, there is also a Get Started section with links to information that is useful to new users of 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 2017 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 Properties 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 Figure 1-9.

FIGURE 1-9

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.

NOTE

Some 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.

When the first icon, the down arrow, is clicked, a context menu opens. 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 2017 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-10