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.
- Double-Click Maximize 2022: Double-click to maximize the Visual Studio window.
- Fix Mixed Tabs: Detects if code contains both Tabs and spaces and provides an option to convert to one or the other.
- Middle Click Scroll: Use the mouse wheel to scroll through documents.
- Solution Error Visualizer: Displays error hints in Solution Explorer.
- Dev Essentials: The following extensions are part of the "Dev Essentials" bundle. Before Visual Studio 2019, this was known as "Web Essentials".
- File Icons: Beautifies file icons in Solution Explorer.
- SVG Viewer: Adds SVG preview and related optimization features to the editor.
- Editor Enhancements: Enhances editor features such as code sorting, text encoding, etc.
- Dummy Text Generator: Quickly generate placeholder text when building sample screens.
- Markdown Editor v2: Adds Markdown-related features to the editor.
- Image Optimizer: Compresses image sizes.
- ResXManager: Essential for multi-language development. Provides an Excel-like UI to manage all
.resxfiles centrally, avoiding the need to switch files manually. - Editor Guidelines: Provides vertical guidelines to help 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's build messages (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.
- Reason for switching to an "Independent List": I used to install bundles directly, but encountered management inconveniences, so I started maintaining my own list:
- Opaque Content: Installing a bundle often makes it unclear which specific tools are included, and the content changes frequently with versions (e.g., Web Compiler was later removed and required a separate installation).
- Overlapping and Obsolete Features: With Visual Studio updates (especially the transition to 64-bit in 2022), many old features in bundles became unusable or were replaced by built-in VS features (like Zen-Coding).
- Incomplete Removal: Uninstalling a bundle usually does not remove the sub-extensions installed with it, leaving the environment cluttered with unused tools.
- Reason for switching to an "Independent List": I used to install bundles directly, but encountered management inconveniences, so I started maintaining my own list:
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 is often observed when working with SQL files. Disabling this setting can resolve it (this setting was removed in Visual Studio 2026).
- Fonts and Colors: Choose the monospaced font "Cascadia Mono" with a size of 12.
- General:
TIP
- Font Selection: I used to use 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 Codesupports "Ligatures" (e.g., typing!=automatically displays as≠). To avoid confusion with symbols while coding (e.g., determining if it's a full-width character or a ligature effect), I chooseCascadia Mono, which does not support ligatures.
- Cascadia Code vs. Mono: Both fonts are identical, but
- Document Tabs:
- Set tab location: If you use a widescreen 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 colors by project or file type.
- Show "Close" button: "Show on document tabs" 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.
- Per-user extensions.
- Text Editor:
- General: Check "Show all".
- 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 a white line between methods and properties whenever there is a blank line.
- Fading: Enable this setting to be reminded of redundant usings and variables.
- Editor Help: "Underline reassigned variables": Useful for confirming if a variable has been reassigned multiple times.
- Advanced:
- C#:
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 features.
- Microsoft.EntityFrameworkCore.Tools: Console tools.
TIP
For projects that do not build Entities, you generally only need to install the following:
- Microsoft.EntityFrameworkCore.
- Microsoft.EntityFrameworkCore.SqlServer or another database provider.
- Microsoft.EntityFrameworkCore.Relational.
- CommunityToolkit.Mvvm: A package used 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 can convert time and numbers into colloquial English, handle English singular/plural conversions, and various string formatting tasks.
- CsvHelper: CSV package.
- NPOI: A free Excel package.
TIP
- Another more powerful Excel package is 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, though it is fine for personal use.
- NPOI supports the "XLS" format, while EPPlus only supports "XLSX". In my experience, EPPlus currently supports slightly more features.
- Serilog.AspNetCore: The standard solution for modern structured logging.
TIP
- Core Concept: Traditional NLog records "Text," while Serilog records "Data." For example,
Log.Info("User {Id}", id), Serilog treatsIdas a searchable field rather than simple string 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 decide where logs are written. Common ones include:
Serilog.Sinks.Console: For viewing in the console during development.Serilog.Sinks.File: Writes to local files.Serilog.Sinks.Seq: Highly recommended to use with Seq. It visualizes structured logs, making debugging far more efficient than reading text files.
- Package Combination: When developing Web projects, it is recommended to install
- Scrutor: A standard addition for enhancing Microsoft's native DI (Microsoft.Extensions.DependencyInjection).
TIP
In the early days of .NET Framework, Autofac was commonly used as the 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.
- SSH.NET: SFTP package.
- FluentFTP: FTP package.
- MQTTnet: MQTT package.
- YARP (Yet Another Reverse Proxy): A reverse proxy package led by Microsoft.
TIP
In the early days, the mainstream microservice gateway was Ocelot. 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
- Selection Advice: If you only need ZIP compression and have no other dependencies, use DotNetZip. If the project already has NPOI installed, it depends on SharpZipLib, so you can use SharpZipLib directly to avoid redundant installations.
- Security Reminder: Some approaches call
7z.exeon the host for compression, which usually involves writing data to temporary files. If the project has data encryption or "no-disk-write" security requirements, this approach might lead to data leaks due to residual temporary files (e.g., if the original file is not deleted when compression fails). Using native packages to process in memory is relatively safer. - .NET's built-in
System.IO.Compressionis also a great lightweight choice.
- Security Reminder: Some approaches call
Unit testing-related packages:
- NUnit: NUnit framework.
- NUnit3TestAdapter: Adapter for NUnit and Visual Studio.
- NSubstitute: Unit testing isolation framework.
DefaultDocumentation: Converts Visual Studio XML comments into API documentation using Markdown syntax.
Project versioning-related packages:
- MinVer: Sets the project version based on Git Tags.
- GitVersion.MsBuild: Uses Git flow to set the project version.
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 creation.
- 2025-04-06
- Added explanation for "Automatically update extensions" setting.
- 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 setting recommendations; now recommending the Cascadia font family.
- Added packages such as YARP, Scrutor, and MQTTnet.
