Skip to content
View Article Network
Article Series:Commonly Used Extensions (1 / 2)

Commonly Used Extensions - Visual Studio

As I get older, my memory isn't what it used to be. Every time I install Visual Studio, I spend time looking up which extensions I previously installed and what they do. So, I'm writing this article to keep a record.

Visual Studio Extensions

  • Productivity Power Tools: The following extensions are part of the "Productivity Power Tools" bundle.
  • Dev Essentials: The following extensions are part of the "Dev Essentials" bundle. This package was known as "Web Essentials" before Visual Studio 2019.
  • ResXManager: Essential for multi-language development. Provides an Excel-like UI to manage all .resx files centrally, avoiding the need to switch files manually.
  • Editor Guidelines: Provides guide lines to identify overly long lines of code. I usually add them at the 80, 100, and 120 character marks.
  • VSColorOutput: Adds color coding to the Output window (red for errors, green for success), significantly reducing the time spent scanning logs.

TIP

  • Evolution of Bundles: "Productivity Power Tools" and "Web Essentials" were originally single large extensions. Later, Microsoft split them into multiple independent extensions and provided "Bundles" to install recommended combinations at once.
    • Reasons for switching to an "Independent List": I used to install bundles directly, but I encountered management inconveniences, so I switched to maintaining my own list:
      1. Opaque Content: Installing a bundle often leaves you unsure of exactly which tools are included, and the content changes frequently with versions (e.g., Web Compiler was later removed and required a separate installation).
      2. Overlapping and Obsolete Features: With Visual Studio updates (especially after the transition to 64-bit in 2022), many old features in bundles no longer work or have been replaced by built-in VS features (like Zen-Coding).
      3. Incomplete Uninstallation: Removing a bundle usually does not remove the sub-extensions installed with it, leaving the environment cluttered with tools that are no longer needed.

Visual Studio Settings

  • Environment:
    • General:
      • Optimize rendering for screens with different pixel densities: If you find the mouse cursor acting erratically in Visual Studio, this often happens when working with SQL files. Disabling this setting can resolve the issue (this setting was removed in Visual Studio 2026).
      • Fonts and Colors: Choose the monospaced font "Cascadia Mono" with a size of 12.

TIP

  • Font Selection: I previously used Consolas, but recently switched to the built-in Cascadia Mono. It is designed specifically for code and offers a better reading experience on high-resolution screens compared to Consolas.
    • Cascadia Code vs. Mono: Both fonts are identical, but Cascadia Code supports "Ligatures," such as automatically displaying != as . To avoid confusion when coding (e.g., distinguishing between full-width characters and ligature effects), I choose Cascadia Mono, which does not support ligatures.
  • Document Tabs:
    • Set tab position: If you use a wide monitor or dual monitors, it is recommended to set this to "Left" or "Right" to increase vertical reading space.
    • Tab coloring: It is recommended to check this to distinguish tabs by project or file type.
    • Show "Close" button: "Show on document tab" is checked by default, which is convenient for closing files directly.
  • Extensions:
    • Per-user extensions.
      • If an extension requires a specific version, uncheck "Automatically update extensions." Visual Studio 2026 allows excluding specific extensions from automatic updates.
  • Text Editor:
    • General: Check all options.
  • Languages:
    • C#:
      • Advanced:
        • Using directives: During the .NET Framework era, I was accustomed to enabling "Place 'System' directives first when sorting usings." If you aren't using an editorconfig, it's best to ensure team settings are consistent.
        • Outlining: Enable "Show procedure line separators": This adds white lines between methods and properties whenever there is a blank line.
        • Fading: Enable this setting to be alerted about redundant usings and variables.
        • Editor Help: "Underline reassigned variables": Useful for confirming whether a variable has been assigned multiple times.

NuGet Packages

  • Microsoft Packages:
    • Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation: Dynamically compiles ASP.NET Core Razor files.
    • Entity Framework Core:
      • Microsoft.EntityFrameworkCore: Basic EF Core functionality.
      • Microsoft.EntityFrameworkCore.SqlServer: SQL Server database provider. For other databases, please refer to "Database Providers".
      • Microsoft.EntityFrameworkCore.Design: Entity Framework design tools for tasks like Migrations.
      • Microsoft.EntityFrameworkCore.Relational: Common relational database functionality.
      • Microsoft.EntityFrameworkCore.Tools: Console tools.

TIP

For projects that do not build Entities, you generally only need to install the following packages:

- Microsoft.EntityFrameworkCore
- Microsoft.EntityFrameworkCore.SqlServer or another database provider
- Microsoft.EntityFrameworkCore.Relational
  • CommunityToolkit.Mvvm: A package to simplify MVVM architecture development.
  • Dapper: A lightweight ORM package.
  • EF Core Power Tools: Provides a graphical interface for Entity Framework Core reverse engineering, making it easy to generate Models from a database.
  • FluentValidation: Build strongly-typed validation rules.
  • Humanizer: A powerful string manipulation tool that converts time, numbers, and strings into human-readable English, handles singular/plural conversions, and various string formats.
  • CsvHelper: CSV package.
  • NPOI: A free Excel package.

TIP

  • There is another more powerful Excel package called EPPlus, but it was only free to use before EPPlus 4. Since EPPlus 5, the license changed to "Polyform Noncommercial 1.0.0", which cannot be used in commercial environments. However, it is fine for personal use.
    • NPOI supports the "XLS" format, while EPPlus only supports "XLSX". In my experience, EPPlus currently supports more features.

TIP

  • Core Concept: Traditional NLog records "Text," while Serilog records "Data." For example, Log.Info("User {Id}", id), Serilog treats Id as a searchable field rather than simple text concatenation.
    • Package Combination: When developing Web projects, it is recommended to install Serilog.AspNetCore (which integrates the core and DI).
    • Sinks: Serilog uses a "Sinks" plugin mechanism to determine where logs are written. Common ones include:
      • Serilog.Sinks.Console: For viewing in the console during development.
      • Serilog.Sinks.File: For writing to local files.
      • Serilog.Sinks.Seq: Highly recommended to use with Seq. It visualizes structured logs, making debugging much more efficient than reading text files.
  • Scrutor: A standard tool for enhancing Microsoft's native DI (Microsoft.Extensions.DependencyInjection).

TIP

In the early days of .NET Framework, Autofac was commonly used as a DI container. Although .NET Core has built-in DI, its features are relatively basic (e.g., it does not support Assembly Scanning). Scrutor fills this gap, allowing us to implement automatic registration with concise syntax.

TIP

In the past, Ocelot was the mainstream microservice gateway. Currently, YARP has become the new preferred choice due to its high integration with .NET and active maintenance. Unless you need to handle complex Request Aggregation via "configuration files," YARP performs better in core forwarding and load balancing.

  • Compression-related packages:
    • SharpZipLib: A compression package supporting multiple formats.
    • DotNetZip: A simpler and more intuitive Zip compression package.

TIP

  • Recommendation: If you only need ZIP compression and have no other dependencies, use DotNetZip. If the project already has NPOI installed, you can use SharpZipLib directly to avoid redundant installations since NPOI depends on it.
    • Security Reminder: Some approaches call 7z.exe on the host for compression, which usually involves writing data to temporary files. If your project has data encryption or "no-disk-write" security requirements, this approach might lead to sensitive data leaks due to residual temporary files (e.g., if the original file isn't deleted when compression fails). Using native packages to process in memory is relatively safer.
    • .NET's built-in System.IO.Compression is also a good, lightweight choice.
  • Unit testing-related packages:

  • DefaultDocumentation: Converts Visual Studio XML comments into API documentation using Markdown syntax.

  • Project versioning-related packages:

TIP

  • MinVer is relatively simple, determining the version directly based on Git Tags, making it suitable for lightweight projects.
    • GitVersion is powerful but complex to configure, supporting version generation based on branching strategies (GitFlow).

Change Log

  • 2022-11-10 Initial document created.
  • 2025-04-06
    • Added configuration instructions for "Automatically update extensions."
    • Removed "Code Cleanup on Save" as it has been built into Visual Studio 2022 for a long time.
    • Updated descriptions for some packages.
  • 2025-12-31
    • Removed obsolete and commercial-license-required packages.
    • Updated Visual Studio configuration recommendations, now suggesting the Cascadia font family.
    • Added packages such as YARP, Scrutor, and MQTTnet.