Visual studio

From G1Joshi/Agent-Skills · View interactive version

Visual studio is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert Visual Studio IDE assistance covering C++, .NET/C#, MSBuild project configurations, diagnostic tools, and enterprise debugging. Use when building solutions, configuring MSBuild properties, profiling CPU/memory bottlenecks, or debugging multi-threaded C++/C# applications.

How to use this skill

Skill file

Visual Studio

Visual Studio is a comprehensive 64-bit IDE for .NET and C++ software development, providing enterprise-grade diagnostics, multi-threaded debugging, and MSBuild solution architectures.

When to Use

Quick Start

1. Build Solution via Developer Command Prompt

:: Build Release configuration
msbuild MySolution.sln /p:Configuration=Release /p:Platform="Any CPU" /m

2. Essential Debugging Shortcuts

Core Concepts

Enterprise Component Specification (`.vsconfig`)

Standardizing installed IDE components across engineering teams:

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Workload.ManagedDesktop",
    "Microsoft.VisualStudio.Workload.NetWeb",
    "Microsoft.VisualStudio.Workload.NativeDesktop",
    "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
    "Microsoft.VisualStudio.Component.Windows11SDK.22621",
    "Microsoft.VisualStudio.Component.Git",
    "Component.GitHub.Copilot"
  ]
}

Install components automatically via command line:

vs_enterprise.exe --config .vsconfig --passive --norestart

MSBuild CLI Automation in CI Pipelines

Compiling enterprise solutions headlessly:

:: Build Solution in Release mode with maximum parallelism
msbuild EnterpriseApp.sln /p:Configuration=Release /p:Platform="Any CPU" /m /verbosity:minimal /p:ContinuousIntegrationBuild=true

:: Execute VSTest test runner
vstest.console.exe tests\UnitTests\bin\Release\net8.0\UnitTests.dll --Parallel --Logger:trx

Advanced Diagnostics & Concurrency Profiling

Common Patterns

EditorConfig Formatting Rules (.editorconfig)

Problem: Inconsistent brace styles, indentation, and imports across Visual Studio team members.

Solution: Commit root .editorconfig recognized by Visual Studio MSBuild engine.

# .editorconfig
root = true

[*.{cs,vb}]
indent_style = space
indent_size = 4
csharp_new_line_before_open_brace = all
csharp_preferred_modifier_order = public,private,protected,internal,static,readonly,async:suggestion

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |

| The breakpoint will not currently be hit. No symbols have been loaded. | PDB symbol files missing or mismatched between build output and debug directory | Enable Debug > Windows > Modules, right-click module, and load PDB symbols; verify build output matches. |

| MSBuild error: The target "Build" does not exist in the project | Target SDK or workload not installed | Launch Visual Studio Installer and ensure appropriate workload (e.g. .NET Desktop, Desktop C++) is checked. |

| Solution load time excessively slow | Large solution with hundreds of unloaded projects | Enable Tools > Options > Projects and Solutions > Reopen documents on solution load (uncheck). |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.