Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Visual Studio 2019 Tricks and Techniques

You're reading from   Visual Studio 2019 Tricks and Techniques A developer's guide to writing better code and maximizing productivity

Arrow left icon
Product type Paperback
Published in Jan 2021
Publisher Packt
ISBN-13 9781800203525
Length 386 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Aaron Cure Aaron Cure
Author Profile Icon Aaron Cure
Aaron Cure
Paul Schroeder Paul Schroeder
Author Profile Icon Paul Schroeder
Paul Schroeder
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: Visual Studio IDE Productivity Essentials
2. Chapter 1: Flavors of Visual Studio FREE CHAPTER 3. Chapter 2: Keyboard Shortcuts 4. Chapter 3: IDE Tips and Tricks 5. Chapter 4: Working with a Repository 6. Chapter 5: Working with Snippets 7. Chapter 6: Database Explorers 8. Chapter 7: Compiling, Debugging, and Versioning 9. Section 2: Customizing Project Templates and Beyond
10. Chapter 8: Introduction to Project and Item Templates 11. Chapter 9: Creating Your Own Templates 12. Chapter 10: Deploying Custom Templates 13. Section 3: Leveraging Extensions for the Win
14. Chapter 11: Overviewing Visual Studio 2019 Extensions 15. Chapter 12: Overviewing VS Code Extensions 16. Chapter 13: CodeMaid is Your Friend 17. Chapter 14: Be Your Team's Hero with CodeGenHero 18. Chapter 15: Secure Code with Puma Scan 19. Other Books You May Enjoy Appendix

Visual Studio 2019 (Windows)

Let's start with Visual Studio 2019 (VS 2019), a Windows-based IDE (pronounced AYE-dee-ee). Some people will refer to this product as the full version. This version only runs on Windows (not cross-platform), but it does support both .NET "full framework" and .NET Core (cross-platform) project targets. Something all versions of Visual Studio do exceptionally well is work with diverse programming languages (including C, C++, Visual Basic. NET, C#, F#, JavaScript, TypeScript, Python, Ruby, and Node.js).

Different tiers of features are offered, depending on your needs and budget. Current versions of VS 2019 include a free Community edition as well as paid Professional, Enterprise, and Test Professional versions. The Community and Professional editions are nearly identical when it comes to operational features and, for most development tasks, any version of Visual Studio will work.

The Community version is depicted in the screenshot that follows and you will find virtually no difference between its appearance and that of the other versions:

Figure 1.2 – VS 2019 Community – Windows

Figure 1.2 – VS 2019 Community – Windows

Even with multiple options, choosing a Visual Studio edition is much easier today than in the past. Previously, certain project types could only be loaded in one edition or another, and many add-ins would not run in certain editions. Complex licensing issues compounded these problems, making it more difficult to choose.

Today, even the free Community edition is a powerful environment with much to offer. Many of the popular features, such as peeking at definitions, multi-targeting of release targets, and refactoring are supported in all editions.

More succinctly, the major versions of VS 2019 are as follows:

  • Community – Free for students, open source contributors, and individuals
  • Professional – The best choice for small teams
  • Test Professional – An option for dedicated Quality Assurance (QA) roles
  • Enterprise – Offers extra features (mentioned later in this chapter) and works well for teams of any size

In the past, the Community version, originally labeled "Express," was a very limited version that allowed only basic application development but would not allow for particular target types (such as Visual Studio plugins), and would also not allow a number of plugins to run. While some of these limitations seemed minor, they were enough to create negative perceptions of the platform among some developers and sour development community sentiment on the Community version. In recent years, Microsoft has removed many of the original restrictions and enabled so much functionality in this version that the experience is now very similar to the Professional version.

Traditionally, the Professional version was the lowest tier version for "true" developers. Because of the limitations of other versions, this was the only way to do "actual" development. This version tier is (and always has been) a full-featured IDE with all the bells and whistles you would expect in a professional development tool.

A key difference is that VS 2019 Community is free, while the Professional version retails for about $1,199 for the first year's subscription and $799 annually for renewal thereafter. However, there are license restrictions that limit use of Visual Studio Community to teams of less than five developers. Also, it cannot be used by commercial organizations with over $1 million US dollars in annual revenue.

For those whose focus is purely QA, and not development, Test Professional is another option to consider. It provides an integrated testing toolset for QA teams, but does not include an IDE to build applications. Instead, this product flavor focuses on the creation and execution of tests and test suites. It also integrates nicely with Visual Studio Team Foundation Server (VSTFS) and Azure DevOps (ADO).

Finally, the Enterprise version of VS 2019 is available for organizations with more than 25 developers, or those seeking to take advantage of advanced features only available at this highest tier. This level includes advanced functionality such as memory profilers, Snapshot Debugger, Live Unit Testing, architectural layer diagrams, and architecture validation. An overview of some of these capabilities is provided next.

Features of VS 2019 Enterprise edition

The following provides a brief overview of a few features that are specific to the Enterprise version of VS 2019. These items may help you decide whether this is the right flavor of the IDE for your needs:

  • Performance profiling tools: VS 2019 provides a dozen or more profiling tools that can help diagnose different kinds of performance issues. Common metrics you may want to analyze include CPU usage, memory usage, and database performance. Some of these tools require the Enterprise edition, and some do not. Use this link to investigate the specific tools that match your needs: https://docs.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour?view=vs-2019.
  • Live Unit Testing: While you are coding, Live Unit Testing automatically runs unit tests in the background and shows your code coverage live in Visual Studio. It provides a line-by-line visual indicator of test coverage as well as the status of passing/failing tests. As you modify code, this feature dynamically executes tests and provides immediate notification when changes cause tests to fail.
  • Snapshot Debugger: If you are using Azure Application Insights, the Snapshot Debugger can be used to capture the state of source code and variables from a live, running, application. This can be helpful for troubleshooting exceptions that occur in a production environment. If you do not have the Enterprise edition of Visual Studio, you can view debug snapshots in the online portal, but using the Enterprise edition provides a more robust debugging experience.
  • Live Dependency Validation: Another feature, only available in the Enterprise edition, is Live Dependency Validation. This lets teams validate architectural dependencies to ensure that they respect defined architectural constraints. In complex multi-layer applications, this can help ensure code dependencies flow in the right direction, which is important for maintainability. This can be useful on project teams with junior developers who may not fully understand the design. Detailed coverage of the Live Dependency Validation feature is beyond the scope of this chapter, but this video link provides a basic overview: https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/T123.

    Visual Studio Installer

    To use certain features, like Code Map and Live Dependency Validation components, you must run the Visual Studio Installer, select the Individual components tab, and scroll down to the Code tools section. From there, select the Code Map and Live Dependency Validation components, as shown in the following screenshot. When you are ready, click the Modify button:

Figure 1.3 – Visual Studio Installer

Figure 1.3 – Visual Studio Installer

Note

To be accurate, Visual Studio's Community and Professional editions do allow you to open diagrams that were generated using the Enterprise edition, albeit in read-only mode.

Despite their differences, from a functionality standpoint, the look and feel of all the editions are pretty much the same. Menus, tools, and functional controls are all implemented consistently, perform the same functions, and are mostly indistinguishable from one another.

Use the following link to review specific differences between versions: https://visualstudio.microsoft.com/vs/compare/.

In short, whichever version you choose, the experience should be nearly the same. For most development tasks, it makes no difference which version you are running: they all have the basic software development life cycle tools to create, debug, and run web, mobile, console, library, and just about any other project you can devise.

You have been reading a chapter from
Visual Studio 2019 Tricks and Techniques
Published in: Jan 2021
Publisher: Packt
ISBN-13: 9781800203525
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime