dqz00116/skill-lib/msvc-build
Claude Code and agent skill by dqz00116/skill-lib
- community
Checking that the SKILL.md file is still in the repository.
Use when compiling MSVC C++ projects, debugging build errors, or performing clean and incremental builds
Install
npx vskill@latest install dqz00116/skill-lib/msvc-buildSKILL.md
MSVC Build Skill
Overview
This skill provides guidance for compiling and building Microsoft Visual C++ projects using MSBuild, with intelligent error detection and resolution suggestions.
When to Use
Use this skill when you need to:
- Compile C++ projects in Visual Studio solutions (.sln)
- Build individual project files (.vcxproj)
- Debug compilation errors
- Perform incremental or clean builds
- Compile with specific configurations (Debug/Release, Win32/x64)
Prerequisites
- Visual Studio 2019/2022 installed
- MSBuild available in PATH or at standard location
- Project solution (.sln) or project file (.vcxproj)
Workflow
Step 1: Detect Build Environment
Automatically locate MSBuild:
- Check PATH for
msbuild.exe - Search standard VS2019/2022 installation paths
- Report MSBuild version and location
Step 2: Analyze Project Structure
Identify:
- Solution file (.sln) location
- Project dependencies
- Available configurations (Debug/Release)
- Available platforms (Win32/x64)
Step 3: Execute Build
Full Solution Build:
Single Project Build:
Incremental Build (faster):
Clean Build:
Step 4: Error Analysis
Parse MSBuild output and categorize errors:
| Error Type | Pattern | Suggestion | |
|---|---|---|---|
| Missing include | C1083: Cannot open include file | Check include paths, verify file exists | |
| Undeclared identifier | C2065: 'X': undeclared identifier | Check header includes, verify declaration | |
| Syntax error | C2143, C2061 | Check syntax, missing semicolons | |
| Type undefined | C2027: use of undefined type | Forward declaration or missing include | |
| Link error | LNK2019, LNK2001 | Check library dependencies, export macros | |
| Precompiled header | C2857, C1853 | Ensure #include "StableHeaders.h" first |
Build Commands Reference
Basic Build
Targeted Build
Verbosity Levels
Parallel Build
Common Issues and Solutions
Issue 1: MSBuild Not Found
Error:
Solution:
- Use Developer Command Prompt for Visual Studio
- Or provide full path to MSBuild:
- VS2022:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe - VS2019:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
Issue 2: Missing Include Files
Error:
Causes:
- Missing AdditionalIncludeDirectories in .vcxproj
- Using command-line without proper environment setup
- Relative path errors in #include statements
Solutions:
- Use Visual Studio IDE (handles include paths correctly)
- Ensure Property Sheets (.props) are imported
- Check AdditionalIncludeDirectories in project settings
Issue 3: Precompiled Header Errors
Error:
Solution:
- Ensure first line of .cpp file is
#include "StableHeaders.h"(or project's PCH header) - Check Precompiled Header settings in project properties
Issue 4: Link Errors
Error:
Solutions:
- Check Additional Dependencies in Linker settings
- Ensure required .lib files are built
- Verify __declspec(dllexport/dllimport) macros for DLLs
Integration with VS IDE
Running from IDE
- Open
.slnfile in Visual Studio - Select configuration from toolbar (Debug/Release, Win32/x64)
- Build → Build Solution (Ctrl+Shift+B)
- View errors in Error List window (Ctrl+\, E)
Best Practices
- Always use /m for parallel builds - Significantly faster on multi-core systems
- Start with minimal verbosity - Use
/v:m, increase only when debugging - Clean build after major changes - Delete
Debug/orRelease/folders - Build dependencies first - Core libs → Network → Common → Executables
- Check Property Sheets - Ensure
.propsfiles are correctly imported
Safety Notes
- Never modify
.vcxprojfiles directly without backups - Property Sheets (.props) changes affect multiple projects
- Precompiled header changes require full rebuild
- Be cautious with compiler warnings treated as errors
Example Session
User: Compile WorldServer project in Debug Win32
Agent:
Limitations
- Cannot fix source code errors automatically
- Cannot modify project dependencies
- Cannot resolve missing third-party libraries
- Large solutions may require IDE for full context
See Also
- Microsoft MSBuild documentation: https://docs.microsoft.com/visualstudio/msbuild/
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmsvc-build/SKILL.md
Popularity
- Repository stars
- 22
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dqz00116/skill-lib/msvc-build)