Book Image

Visual Studio 2015 Cookbook - Second Edition

By : Jeff Martin
Book Image

Visual Studio 2015 Cookbook - Second Edition

By: Jeff Martin

Overview of this book

Visual Studio 2015 is the premier tool for developers targeting the Microsoft platform. Learning how to effectively use this technology can enhance your productivity while simplifying your most common tasks, allowing you more time to focus on your project. 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. Visual Studio 2015 Cookbook will introduce you to all the new areas of Visual Studio and how they can quickly be put to use to improve your everyday development tasks. With this book, you will learn not only what VS2015 offers, but what it takes to put it to work for your projects.
Table of Contents (17 chapters)
Visual Studio 2015 Cookbook Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Preface

The release of the Visual Studio 2015 Cookbook marks the third edition of a book series devoted to provide the reader with an informative tour of how Visual Studio 2015 (VS2015) can make your development work easier. This newest release of Visual Studio demonstrates Microsoft's renewed drive to make the best programming tools it can, regardless of the device and platforms that a developer is targeting. If that target happens to run Windows, then all the better—but it is no longer a hindrance if it does not.

This book is significantly updated and rewritten so that the reader can make use of the incredible array of new tools and devices supported by VS2015. With the greater number of platforms supported, it can be easy to overlook the new features offered in VS2015. One of the main goals of this book is to show developers the new ways in which they can put VS2015 to work in their daily development.

This book will begin by providing a guided tour of the main editor windows used in VS2015, which should be of interest to all users regardless of their desired language. After that, the book will show how different platforms can get work done faster with VS2015, whether it is for web programming, .NET, or classic C++ application development.

VS2015 lets you use the languages you are comfortable with while you target the platforms needed to support your customers. Taking advantage of the information provided in this book will help you maximize the tools VS2015 provides.

Choosing the right version of Visual Studio 2015

With V2015, Microsoft has greatly simplified the different offerings it provides. If you work on open source projects or independent developers, Visual Studio Community 2015 is free of charge and probably your best choice. Professional developers working in corporate settings or larger software companies should choose between Visual Studio Professional and Visual Studio Enterprise. If the price is of no concern, then Enterprise is a better choice as it includes all the available features. Note that Visual Studio Premium is no longer available for VS2015.

Tip

Different editions of VS2015 can be installed side by side, so feel free to install any/all of the above as needed for your work.

What this book covers

Chapter 1, Exploring Visual Studio 2015, starts us off by taking a tour of the new features found in the editor itself. VS2015 makes some key refinements, and this chapter covers them all, ranging from logging in to project navigation.

Chapter 2, Getting Started with Universal Windows Platform Apps, examines the development process for UWP apps for Windows 10 powered systems. The full process of obtaining a developer license to build, test, and publish an app is covered here.

Chapter 3, Web Development, covers several areas of web development and how VS2015 can assist you. Here, we'll cover the multi-browser preview, as well as editor enhancements that can benefit HTML5, CSS, and JavaScript programmers.

Chapter 4, .NET Framework Development, focuses on developing applications that run on .NET. Desktop application development is still a key market, and this chapter shows different ways in which VS2015 can help.

Chapter 5, Debugging Your .NET Application, profiles the various ways to debug your .NET-based code. This includes dealing with troubleshooting the code running on a device other than your development workstation.

Chapter 6, Asynchrony in .NET, deals with the use of asynchronous code to provide more responsive applications and discusses how it may benefit your applications.

Chapter 7, Unwrapping C++ Development, tackles the elder statesman of languages served by VS2015. Several recipes are provided to benefit your C++ usage—some of the areas covered include unit testing, DirectX, and the Visual Studio Graphics Debugger.

Chapter 8, Working with Team Foundation Server 2015, describes how Team Foundation Server can benefit your productivity. As modern source control continues to evolve, information on using Git is included.

Chapter 9, Languages, takes a moment to look at some languages other than .NET and C++, which include TypeScript and Python. Python has a long and successful history, and it is now a first-class citizen of Visual Studio. A new capability for VS2015 is Linux-based targets, and this is also explored here.

Chapter 10, Final Polish, in this final chapter, we will cover some ways to extend Visual Studio's abilities, and we will get your app ready for consumption by end users.

What you need for this book

To follow the recipes in this book, you will need a copy of Visual Studio 2015. Some of the features covered in the recipes may only be available in specific editions of Visual Studio. Thanks to Microsoft's new product lineup, most of the recipes are compatible with the freely available Visual Studio Community. It will be noted if a given recipe has additional requirements.

If you wish to follow one of these recipes, and you do not have the right edition, trial versions for premium versions can be downloaded from the Microsoft website, which enables you to check whether a particular feature will benefit your project.

For any of the recipes that deal with Universal Windows Platform (UWP) applications, you will need to use Windows 10 as your operating system.

Who this book is for

If you already know your way around the previous versions of Visual Studio, if you are familiar with Microsoft development, and if you're looking to quickly get up to speed with the latest improvements in the 2015 edition of Microsoft's number one development tool, this book is for you.

If you are an experienced developer who has used Eclipse or XCode, you should also be able to find this book useful to explore the differences between your tools and the latest ones that Microsoft has to offer.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

var http = require('http')
var finalhandler = require('finalhandler')
var serveStatic = require('serve-static')

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

class BankVault
{
  public:
  BankVault();
  ~BankVault();
  int AddFunds(int amount);
  void StageHeist();
  int CurrentFunds();
};

Any command-line input or output is written as follows:

print('Hello World')
a=32
b=64
print("Results: " + (b+a))

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "The arrow in the following screenshot indicates where the Sign in option is located."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/VisualStudio2015CookbookSecondEdition_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.