45,59 €
A guide to mastering Visual Studio 2017
.NET Developers who would like to master the new features of VS 2017, and would like to delve into newer areas such as cloud computing, would benefit from this book. Basic knowledge of previous versions of Visual Studio is assumed.
Visual Studio 2017 is the all-new IDE released by Microsoft for developers, targeting Microsoft and other platforms to build stunning Windows and web apps. 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. With this book, you will learn not only what VS2017 offers, but also what it takes to put it to work for your projects.
Visual Studio 2017 is packed with improvements that increase productivity, and this book will get you started with the new features introduced in Visual Studio 2017 IDE and C# 7.0. Next, you will learn to use XAML tools to build classic WPF apps, and UWP tools to build apps targeting Windows 10. Later, you will learn about .NET Core and then explore NuGet, the package manager for the Microsoft development platform. Then, you will familiarize yourself with the debugging and live unit testing techniques that comes with the IDE. Finally, you'll adapt Microsoft's implementation of cloud computing with Azure, and the Visual Studio integration with Source Control repositories.
This comprehensive guide covers the advanced features of Visual Studio 2017, and communicates them through a practical approach to explore the underlying concepts of how, when, and why to use it.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 348
Veröffentlichungsjahr: 2017
BIRMINGHAM - MUMBAI
< html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2017
Production reference: 1250717
ISBN 978-1-78728-190-5
www.packtpub.com
Author
Kunal Chowdhury
Copy Editor
Safis Editing
Reviewer
Dirk Strauss
Project Coordinator
Prajakta Naik
Commissioning Editor
Merint Mathew
Proofreader
Safis Editing
Acquisition Editor
Karan Sadawana
Indexer
Mariammal Chettiyar
Content Development Editor
Siddhi Chavan
Graphics
Abhinash Sahu
Technical Editor
Tiksha Sarang
Production Coordinator
Nilesh Mohite
Kunal Chowdhury has been a Microsoft MVP (Most Valuable Professional) since 2010, starting with Silverlight to Windows app development. He is also a renowned public speaker, active blogger (by passion), and a software engineer (senior/technical lead) by profession. Over the years, he has acquired profound knowledge on various Microsoft products and helped developers throughout the world with his deep knowledge and experience.
As a technical buff, Kunal has in-depth knowledge of OOPs, C#, XAML, .NET, WPF, UWP, Visual Studio, Windows 10 and Microsoft Azure. He is also proficient in entire Software Development Life Cycle (SDLC) and Scrum methodology. He has written many articles, tips & tricks on his technical blog (kunal-chowdhury) for developers and consumers.
You can contact Kunal via email at [email protected]. You can also followhim on Twitter at @kunal2383 and become a part of his major fans on social media channels for the updates that he shares over there.
Dirk Strauss is a software developer and Microsoft MVP from South Africa, with over 13 years of programming experience. He has extensive experience in SYSPRO Customization, an ERP system, with C# and web development being his main focus.
He works for Evolution Software, developing responsive web applications with incredibly inspirational and talented individuals.
He has authored the books C# Programming Cookbook and C# 7 and .NET Core Cookbook - Second Edition, published by Packt. He has written for Syncfusion, contributing to the Succinctly series of ebooks, and he also blogs at www.dirkstrauss.com whenever he gets a chance.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787281906.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
What is New in Visual Studio 2017 IDE?
The new installation experience
Overview of the new installation experience
Installation using the online installer
Creating an offline installer of Visual Studio 2017
Installing Visual Studio 2017 from the command line
Modifying your existing Visual Studio 2017 installation
Uninstalling Visual Studio 2017 installation
Signing in to Visual Studio 2017
The new features and enhancements to the Visual Studio IDE
Overview to the redesigned start page
The improved code navigation tool
Changes to Find All References of an instance
Structural guide lines
Editor config
The Roaming Extension Manager feature
Open folders in a convenient way
Lightweight solution loading
Connected Services
Acquiring tools and features by using In-Product Acquisition
The Run to Click feature
Improved Attach to Process with process filtering
The new exception helper
Add conditions to Exception Settings
Updates to Diagnostic Tools
Summary
What is New in C# 7.0?
Local functions or nested functions
Literal improvements in C# 7.0
The new digit separators
Getting to know about pattern matching
The Is expression with pattern matching
Switch statements with pattern matching
The ref returns and locals
New changes to tuples
Changes to the throw expression
Changes to the expression-bodied members
New changes with the out variables
Getting to know about deconstruction syntax
Uses of the generalized async return types
Summary
Building Applications for Windows Using XAML Tools
The WPF architecture
Presentation Framework
Presentation Core
Common Language Runtime
Media Integration Library
OS Core
Types of WPF applications
The XAML overview
Object element syntax
Property attribute syntax
Property element syntax
Content syntax
Collection syntax
Event attribute syntax
Understanding the XAML namespaces
Working with inline code in XAML pages
The code behind file of an XAML page
Building your first WPF application
Getting started with WPF project
Understanding the WPF project structure
Getting familiar with XAML Designer
Adding controls in XAML
Command-line parameters in WPF application
Layouts in WPF
Using Grid as a WPF panel
Using StackPanel to define stacked layout
Using Canvas as a panel
Using WPF DockPanel to dock child elements
Using the WrapPanel to automatically reposition
Using UniformGrid to place elements in uniform cells
WPF property system
Data binding in WPF
Using Converters while data binding
Using triggers in WPF
Property trigger
Multi trigger
Data trigger
Multidata trigger
Event trigger
Summary
Building Applications for Windows 10 Using UWP Tools
Getting started with Universal Windows Platform
Generic design principles of UWP apps
Effective scaling
Effective pixels
Universal controls
Universal styles
Repositioning of controls
Resizing the UI
Reflowing of UI elements
Replacing the UI Elements
Revealing the UI elements
Getting started with UWP app development
Building your first UWP application
Setting up the development environment for first use
Setting up the developer mode
Creating, building, and running the application
Designing UWP applications
Defining XAML page layouts
The relative panels
The VariableSizedWrapGrid class
Data manipulation in a view
The GridView control
The ListView control
The FlipView control
Application designing with the XAML style
Defining a style as a resource
Inheriting a style from another style
Building your own XAML control
Creating the custom control
Exposing properties from a custom control
Generating visual assets using the new Manifest Designer
Preparing UWP apps to publish to Windows Store
Summary
Building Applications with .NET Core
Overview of .NET Core
Installation of .NET Core with Visual Studio 2017
A quick lap around the .NET Core commands
Creating a .NET Core console app
Creating a .NET Core class library
Creating a solution file and adding projects in it
Resolving dependencies in the .NET Core application
Building a .NET Core project or solution
Running a .NET Core application
Publishing a .NET Core application
Framework-Dependent Deployments
Self-Contained Deployments
Creating an ASP.NET Core application
Creating a unit testing project
Creating .NET Core applications using Visual Studio
Publishing a .NET Core application using Visual Studio 2017
Framework-Dependent Deployments
Self-Contained Deployments
Creating, building, and publishing a .NET Core web app to Microsoft Azure
Summary
Managing NuGet Packages
Overview to NuGet package manager
Creating a NuGet package library for .NET Framework
Creating the metadata in NuGet spec file
Building the NuGet Package
Building NuGet Package for multiple .NET Frameworks
Building NuGet package with dependencies
Creating a NuGet package library for .NET Standard
Editing the metadata of the project
Building the NuGet Package from Visual Studio 2017
Building a NuGet Package with package references
Testing the NuGet package locally
Publishing NuGet package to NuGet store
Managing your NuGet packages
Summary
Debugging Applications with Visual Studio 2017
Overview of Visual Studio debugger tools
Debugging C# source code using breakpoints
Organizing breakpoints in code
Debugger execution steps
Adding conditions to breakpoints
Using conditional expressions
Using breakpoint hit counters
Using breakpoint filters
Adding actions to breakpoints
Adding labels to breakpoints
Managing breakpoints using the Breakpoints window
Exporting/importing breakpoints
Using the Data Tips while debugging
Pinning/unpinning Data Tips for better debugging
Inspecting Data Tips in various watch windows
The Autos window
The Locals window
The Watch window
Using visualizers to display complex Data Tips
Importing/exporting Data Tips
Using debugger to display debugging information
Using the Immediate Window while debugging your code
Using the Visual Studio Diagnostics Tools
Using the new Run to Click feature in Visual Studio 2017
Debugging an already running process
Debugging XAML application UI
Overview of XAML debugging
Inspecting XAML properties on Live Visual Tree
Enabling UI debugging tools for XAML
Summary
Live Unit Testing with Visual Studio 2017
Overview of Live Unit Testing in Visual Studio 2017
Unit testing framework support
Understanding the coverage information shown in editor
Integration of Live Unit Testing in Test Explorer
Configuring Visual Studio 2017 for Live Unit Testing
Installing Live Unit Testing component
General settings of Live Unit Testing in Visual Studio
Starting/pausing the Live Unit Testing
Including and excluding test methods/projects
Unit testing with Visual Studio 2017
Getting started with configuring the testing project
Understanding the package config
Live Unit Testing with an example
Navigating to failed tests
Summary
Accelerate Cloud Development with Microsoft Azure
Understanding the cloud computing basics
Infrastructure as a Service
Platform as a Service
Software as a Service
Creating your free Azure account
Configuring Visual Studio 2017 for Azure development
Creating an Azure website from portal
Creating a web application
Creating an App Service plan
Managing Azure websites (Web Apps) from the portal
Creating an Azure website from Visual Studio
Creating an ASP.NET Web Application
Publishing the web application to cloud
Updating an existing Azure website from Visual Studio
Building a Mobile App Service
Creating Azure Mobile App
Preparing Azure Mobile App for data connectivity
Adding SQL data connection
Creating a SQL Database
Integrating Mobile App Service in a Windows application
Creating the Model and Service Client
Integrating the API call
Scaling App Service plan
Summary
Working with Source Controls
Working with Git repositories
Installing Git for Visual Studio 2017
Connecting to the source control servers
Getting started with Git repositories
Creating a new repository
Cloning an existing repository
Reviewing the Git configuration settings
Working with Git branches
Creating a new local branch
Switching to a different branch
Pushing a local branch to remote
Deleting an existing branch
Working with changes, staging, and commits
Staging changes to local repository
Committing changes to the local repository
Discarding uncommitted changes
Amending message to an existing commit
Syncing changes between local and remote repositories
Pushing changes to the remote repository
Fetching changes available in the remote repository
Merging changes available in the remote repository to the local repository
Resolving merge conflicts
Working with Pull Requests for code review
Creating Pull Requests for code review
Reviewing an existing Pull Request
Merging a Pull Request
Working with Git commit history
Rebasing changes to rewrite the commit history
Copying commits using Cherry-Pick
Undoing your changes
Resetting a local branch to a previous state
Reverting changes from remote branch
Tagging your commits
Working with Team Projects
Connecting to a Team Project
Cloning an existing project folder
Performing check-out operation to a file
Committing your changes to the repository
Undoing your local changes
Creating code review request
Rolling back your existing change set
Summary
Day by day, a revolution is happening in the computer world; existing technologies are becoming old and obsolete, opening up more space for newer ones. To learn and work on the modern technologies, you will need an updated IDE. Microsoft does the same with developers, most popular IDE named Visual Studio.
Microsoft released Visual Studio for developers in 1997. In 2002, it first received a flavor of .NET, and then it underwent a revolution with many new features in every major build. Along with Visual Studio 2015, Microsoft added support for .NET Core, which is a cross-platform, free, and open source managed software framework, such as .NET.
Visual Studio 2017, initially known as Visual Studio "15", was released on 7th March, 2017. It included a new installation experience, with which you will be able to install a specific workload or a component that you need to accomplish your work. As well as this, it also includes features such as .NET Core, and support for NGen, Editor Config, Docker, and Xamarin. Not only the Microsoft platforms, but Visual Studio 2017 also supports Linux app development, C/C++, Cordova, Python, Node.js, tooling for data science, and analytical applications.
As the industry is forwarding with latest technologies and IDE changes, it is not easy to cope with the latest changes. As a developer, it is very hard to learn everything that a new release brings.
In this book, we will cover most of the changes to move you one step ahead with the advancements. Ranging from the installation changes to new features introduced in the IDE, followed by features introduced in it, C# 7.0 will give you the base to start with Visual Studio 2017. Then, we will move on to learning how to build apps for Windows using XAML tools, UWP tools, and .NET Core; we will learn about NuGet, more on debugging and unit testing applications, cloud development with Azure, and source controls like Git/TFS.
The examples given in this book are simple, easy to understand, and provide you with a heads up to learn and master your skills with the new IDE, Visual Studio 2017. By the time you reach the end of this book, you will be proficient with deep knowledge about each of the chapters that it covers. You will enjoy reading this book with lots of graphical and textual steps to help you gain confidence in working with this IDE.
Choosing the right version of Visual Studio 2017 can be done as follows:
Visual Studio 2017 comes in three different editions and they are: Visual Studio Community 2017, Visual Studio Professional 2017, and Visual Studio Enterprise 2017.
The Visual Studio Community edition is a free, fully-featured IDE for students, open source developers, and individual developers. In all these cases, you can create your own free or paid apps using the Visual Studio 2017 Community edition. Organizations will also be able to use the Community edition, but only under the following conditions:
In an enterprise organization, an unlimited number of users can use the Community edition, if they are using it in a classroom learning environment, academic research, or in an open source project. An organization is defined as an enterprise organization if they have more than 250 computers or $1 million annual revenue.
In a non-enterprise organization, the Community edition is restricted to up to five users.
If you are a professional in a small team, you should go for Visual Studio Professional 2017. If you are a large organization building end-to-end solutions in a team of any size, and if the price does not matter to you, then Visual Studio Enterprise 2017 is the right choice as it includes all the features that it offers.
A point to note is that you can install multiple editions of Visual Studio 2017 side by side. So, feel free to install any or all editions based on your need.
Chapter 1, What is New in Visual Studio 2017 IDE?, focuses on the new IDE-specific changes incorporated in Visual Studio 2017 and how these will help the developers to improve their productivity. Starting from installation, it will cover the various workloads and component parts of the installer, and then guide you through syncing your IDE settings, followed by the new features.
Chapter 2, What is New in C# 7.0?, provides in-depth knowledge to help you learn about the latest changes part of C# 7.0. This chapter will guide you through a number of simple code snippets to help you learn quickly and become proficient in delivering your code.
Chapter 3, Building Applications for Windows Using XAML Tools, focuses on XAML-based Windows Presentation Foundation (WPF) applications for Windows. This will help you learn the WPF architecture, XAML syntax, various layouts, data bindings, converters, and triggers, and guide you through building professional applications from scratch.
Chapter 4, Building Applications for Windows 10 Using UWP Tools, provides a deeper insight to build XAML-based applications targeting Universal Windows Platform (UWP). This is the latest technology platform from Microsoft and the base for Windows 10 specific devices, such as mobile, PC, Xbox, IoT, and so on. This chapter will guide you through learning the generic design principles of UWP apps, followed by designing and styling applications. Later in the chapter, it will guide you to prepare apps to publish to the Windows Store.
Chapter 5, Building Applications with .NET Core, gives you a quick lap around the new Framework and guides you to create, build, run, and publish .NET Core applications. This chapter will cover in-depth knowledge of Framework Dependent Deployments and Self-Contained Deployments. Later, it will guide you through publishing ASP.NET Core applications to Windows Azure.
Chapter 6, Managing NuGet Packages, focuses on the NuGet package manager for the Microsoft development platform including, .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet gallery is the central package repository used by all package authors and consumers. Here, you will learn how to create a NuGet package, publish it to a gallery, and test it.
Chapter 7, Debugging Applications with Visual Studio 2017, focuses on giving you an in-depth understanding on the different debugging tools present inside Visual Studio. It's the core part of every code development. The more comfortable you are with code debugging, the better the code that you can write/maintain. This chapter will help you learn the debugging process in Visual Studio 2017.
Chapter 8, Live Unit Testing with Visual Studio 2017, provides a deeper insight into Live Unit Testing, which is a new module in Visual Studio 2017. It automatically runs the impacted unit tests in the background as you edit code, and then visualizes the results with code coverage, live in the editor. This chapter will help you become proficient in building Live Unit Testing with Visual Studio 2017.
Chapter 9, Accelerate Cloud Development with Microsoft Azure, makes it easy for you to understand the cloud computing basics that includes Microsoft Azure, which is an open, flexible, enterprise-grade cloud computing platform. It basically delivers IaaS (Infrastructure as a Service), PaaS (Platform as a Service), and SaaS (Software as a Service). This chapter will guide you through creating Azure websites and mobile app services, and then integrating those with a Windows application.
Chapter 10, Working with Source Controls, demonstrates the steps to manage your code with versioning support in a source control repository. Source control is a component of software configuration management, source repositories, and version management systems. If you are building enterprise-level applications in a distributed environment, you must use it to keep your code in a safe vault. This chapter will guide you through how easy it is to use Git and TFS to manage your code directly from Visual Studio.
The basic software requirements for this book are as follows:
Microsoft Visual Studio 2017 (version 15.0 or above)
Microsoft .NET Framework 4.5 and above (part of Visual Studio)
Microsoft .NET Core 1.0 (part of Visual Studio)
Windows 10 operating system
An account on Windows DevCenter
An account on Windows Azure
An account on GitHub and/or Microsoft Team Services
.NET developers who would like to master the new features of VS 2017, and would like to delve into newer areas such as cloud computing, would benefit from this book. Basic knowledge of previous versions of Visual Studio is assumed.
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: "The dotnet restore command restores the dependencies and tools of a project."
A block of code is set as follows:
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } }
Any command-line input or output is written as follows:
dotnet sln <SolutionName> add <ProjectName>
dotnet sln <SolutionName> add <ProjectOneName> <ProjectTwoName>
dotnet sln <SolutionName> add **/**
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: "In the New Project dialog, navigate to Installed | Templates | Visual C# | .NET Core."
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 [email protected], 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.
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.
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can download the code files by following these steps:
Log in or register to our website using your e-mail address and password.
Hover the mouse pointer on the
SUPPORT
tab at the top.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box.
Select the book for which you're looking to download the code files.
Choose from the drop-down menu where you purchased this book from.
Click on
Code Download
.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-Visual-Studio-2017. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
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/MasteringVisualStudio2017_ColorImages.pdf.
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 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 [email protected] with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.
Visual Studio 2017 is the new IDE for developers released by Microsoft. It not only focuses on building applications targeting the Microsoft platform, but it can also be used to build applications using C++, Python, and so on. In short, it will be an IDE for every developer who needs to build apps on any platform.
Visual Studio 2017 will help you save time and effort for all the tasks that you want to do with your code, be it code navigation, refactoring, code fixes, debugging, IntelliSense, or unit testing of your module. Not only from the code perspective, but it will also streamline your real-time architectural dependency validation and provide stronger support for the integration of source code repositories, such as TFS (Team Foundation Server) or Git.
It comes with a brand new lightweight installation experience that modularizes the need to improve your efficiency of the fundamental tasks with a faster IDE access to a new way of viewing, editing, debugging, and testing your code.
Not only the common code editing features, but Visual Studio 2017 also comes with Xamarin, which will help you build mobile applications for Android, iOS, and Windows, more quickly and easily than ever. You can also choose the path to build mobile apps with Visual C++ or Apache Cordova, the cloud's first applications powered by Microsoft Azure.
In this chapter, we will cover the new installation experience, as well as the new features and enhancements that Microsoft has added to Visual Studio 2017. The following are the topics that we will discuss in this chapter:
The new installation experience:
Overview of the new installation experience
Installation using the online installer
Creating an offline installer of Visual Studio 2017
Installing Visual Studio 2017 from the command line
Modifying your existing Visual Studio 2017 installation
Uninstalling Visual Studio 2017 installation
Signing in to Visual Studio 2017
The new features and enhancements to the Visual Studio IDE:
Overview of the redesigned start page
The improved code navigation tool
Changes to
Find All References
of an instance
Structural guidelines
Editor config
The
Roaming Extension Manager
Open folders in a convenient way
The
Lightweight Solution Loading
The
Connected Services
Acquiring tools and features by using the
In-Product Acquisition
The
Run to Click
feature
Improved
Attach to Process
with process filtering
The new
Exception Helper
Adding conditions to
Exception Settings
Updates to the
Diagnostic Tools
In this section, we will discuss the various workloads and components of Visual Studio 2017's new installation experience. The basic installer that comes in the web-only mode allows you to select the components that you want to install before it downloads them. This saves you a lot of bandwidth. We will cover them here.
Unlike the previous versions of Visual Studio, you will not find an Offline Installer for Visual Studio 2017. You need to manually create it, which you can use to install Visual Studio 2017 without internet connectivity. This can be done by creating a layout using the web installer. Although the download size of the offline installer is big, it saves you the time and bandwidth when you want to install it on multiple devices.
In this section, we will learn how to configure and install different workloads or components using the online and offline installers. We will then continue to learn the ways to modify or uninstall the Visual Studio installation, as well as signing in to the IDE for a synced workspace setting across devices.
Before going into depth, let's see the system requirements to install Visual Studio 2017:
Visual Studio 2017 will install and run on the following operating systems:
Windows 10 version 1507 or higher to build apps for Universal Windows Platform (UWP)
Windows Server 2016
Windows 8.1 (with Update 2919355)
Windows Server 2012 R2 (with Update 2919355)
Windows 7 SP1 (with the latest Windows Updates)
Here's the hardware requirements:
1.8 GHz or faster processor. It's recommended to have dual core or higher.
At least 2 GB of RAM, minimum 2.5 GB if running in a Virtual Machine. It's recommended to have 4 GB of RAM.
It's recommended to have 1 GB to 40 GB HDD space, based on the features you are going to install.
Visual Studio will work best at a resolution of WXGA (1366 by 768) or higher.
The new version of the installer that is used to install Visual Studio 2017 allows you to control the individual workload/module that you need. Unlike the previous versions of the installer, it does not take more installation space; rather, it allows you to do a basic installation, having a few hundred MBs only for the core editor to install. On a need basis, you can select the workload or the individual module.
The Workloads screen will allow you to select the module that you want to install. If you want to build applications targeting Windows 10 only, you should go with Universal Windows Platform development. Consider the following screenshot:
If you want to build applications for Python or Node.js, the respective workloads are there to help you install the required components. Consider the following screenshot:
We will discuss more about the installation steps in the next point, where we will see how to install Visual Studio 2017 using the online installer.
You can go to https://www.visualstudio.com/downloads/ and select the Visual Studio 2017 edition that best suits your need and then download it. There are three different editions available--Visual Studio Community 2017, Visual Studio Professional 2017, and Visual Studio Enterprise 2017.
The Visual Studio Community edition is a free, fully-featured IDE for students, open source developers, and individual developers. In all these cases, you can create your own free or paid apps using the Visual Studio 2017 Community edition. Organizations will also be able to use the Community edition, but only under the following conditions:
In an enterprise organization, an unlimited number of users can use the Community edition if they are using it in a classroom learning environment, academic research, or an open source project. An organization is defined as an enterprise organization if they have more than 250 computers or a 1 million dollar annual revenue.
In a non-enterprise organization, the Community edition is restricted to up to five users.
To know more about the Visual Studio Community 2017 license terms, check out this page:
https://www.visualstudio.com/license-terms/mlt553321/
If you are a professional in a small team, you need to select Visual Studio Professional 2017, and for end-to-end solutions by a team of any size, select Visual Studio Enterprise 2017.
Once you have downloaded the online/web installer, double-click on it to start the installation process. This will first show a screen where you can read the License Terms and Microsoft Privacy Statement, which you need to agree to before continuing with the installation process. Once you click on the Continue button, the installer will take a few minutes to prepare itself. This is shown in the following screenshot:
The main screen of the installer has three different tab contents--Workloads, Individual components, and Language packs.
The Workloads tab allows you to select the group of components that comes under a single module. In other words, each workload contains the features you need for the programming language or platform you prefer.
For example, if you like to build Windows Presentation Foundation (WPF) applications, you need to select .NET desktop development, and to build ASP.NET web applications, you need to select the ASP.NET and web development module under the workloads.
To install and build applications for both WPF and Windows 10, select .NET desktop development and Universal Windows Platform development, as shown in the following screenshot. For each individual workload, the selected components will be listed in the panel on the right-hand side of the screen:
The Individual components tab lists all the component parts of individual workloads, category wise, for you. The components part of the selected workloads will be auto-checked by default.
The third tab is the Language packs tab, which allows you to choose the language that you want to use with Visual Studio 2017. By default, it's the system's default language selected on the screen; however, you can opt for Czech, French, German, or any other languages from the available list shown in the following screenshot:
By default, a location is prepopulated for the installer to install Visual Studio 2017, but you can change it to a different folder. Once you are done, click on the Install button.
This will start the actual installation process. If you are using the web installer, it will download an individual module from the Microsoft server and install them gradually. This may take some time, based on your selected workloads/components and internet bandwidth. Consider the following screenshot:
This will be fast and take less time than the previous IDE installers. Once it completes the installation, it may ask you to restart your system to take into effect the changes that it made to start the Visual Studio instance. If you see such a message on the screen, as shown in the following screenshot, make sure to restart your computer by clicking on the Restart button:
From the same page, you will be allowed to modify the existing installation, launch the Visual Studio 2017 IDE, or uninstall the complete installation.
Sometimes, we may need to have an offline copy of the installer so that we can install it to multiple devices without an active or fast internet connection. This will save your bandwidth from downloading the same copy multiple times over the network. The offline installer is big. So, before going further to create the offline copy, make sure that you have an active internet connection available with no limitation of download bandwidth.
First, download the Visual Studio setup executable file (web installer) to a drive on your local machine.
Now, run the downloaded setup executable with the following arguments (switches) from a command prompt:
Add
--layout <path>
, where
<path>
is the location where you want the layout to be downloaded. By default, all languages will be downloaded along with all the packages.
In case you want to restrict the download to a single language only, you can do so by providing the
--lang <language>
argument, where
<language>
is one of the ISO country codes given in the following list. If not specified, support for all localized languages will be downloaded.
ISO CODE
LANGUAGE
cs-CZ
Czech
de-DE
German
en-US
English
es-ES
Spanish
fr-FR
French
it-IT
Italian
ja-JP
Japanese
ko-KR
Korean
pl-PL
Polish
pt-BR
Portuguese - Brazil
ru-RU
Russian
tr-TR
Turkish
zh-CN
Chinese - Simplified
zh-TW
Chinese - Traditional
As shown in the following screenshot, it will start downloading all the packages part of Visual Studio 2017. As the offline installer is big, it will take plenty of time, depending on the speed of your internet network:
Once the download completes, go to the folder where you downloaded the packages (in our case, it's C:\VS2017\) and run the installer file, that is, vs_enterprise.exe, for example. Then, follow the same steps as mentioned earlier to select the required Workloads and/or Individual components to start the installation process.
You can use command-line parameters/switches to install Visual Studio 2017. Be sure to use the actual installer, for example, vs_enterprise.exe for the Visual Studio 2017 Enterprise edition, and not the bootstrapper file, which is named vs_setup.exe. The bootstrapper file loads the MSI for actual installation. You can also run C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe to install the Visual Studio components from the command line. Here is a list of the command-line parameters/switches:
Parameters/Switch
Description
[--catalog] <uri> [<uri> ...]
Required -- One or more file paths or URIs to catalogs.
