AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Msvc Build

skill-dqz00116-skill-lib-msvc-build · by Dqz00116

Use when compiling MSVC C++ projects, debugging build errors, or performing clean and incremental builds

No reviews yet
0 installs
19 views
0.0% view→install

Install

$ agentstack add skill-dqz00116-skill-lib-msvc-build

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-dqz00116-skill-lib-msvc-build)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Msvc Build? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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:

  1. Check PATH for msbuild.exe
  2. Search standard VS2019/2022 installation paths
  3. 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:

MSBuild Solution.sln /p:Configuration=Debug /p:Platform=Win32 /m

Single Project Build:

MSBuild Solution.sln /t:ProjectName /p:Configuration=Debug /p:Platform=Win32 /m

Incremental Build (faster):

MSBuild Project.vcxproj /p:Configuration=Debug /p:Platform=Win32

Clean Build:

MSBuild Solution.sln /t:Clean
MSBuild Solution.sln /p:Configuration=Debug /p:Platform=Win32 /m

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

# Debug Win32 (most common for development)
MSBuild Project.sln /p:Configuration=Debug /p:Platform=Win32 /m

# Release Win32
MSBuild Project.sln /p:Configuration=Release /p:Platform=Win32 /m

# Debug x64
MSBuild Project.sln /p:Configuration=Debug /p:Platform=x64 /m

Targeted Build

# Build specific project only
MSBuild Project.sln /t:WorldServer /p:Configuration=Debug /p:Platform=Win32

# Build multiple specific projects
MSBuild Project.sln /t:LibClient;Network;Common;WorldServer

Verbosity Levels

# Quiet - only errors
/v:q

# Minimal - errors and warnings (default)
/v:m

# Normal - standard output
/v:n

# Detailed - verbose output
/v:d

# Diagnostic - maximum detail
/v:diag

Parallel Build

# Use all processors (recommended)
/m

# Use specific number of processors
/m:4

Common Issues and Solutions

Issue 1: MSBuild Not Found

Error:

The term 'msbuild' is not recognized

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:

error C1083: Cannot open include file: 'Serialization/OutStream.h'

Causes:

  • Missing AdditionalIncludeDirectories in .vcxproj
  • Using command-line without proper environment setup
  • Relative path errors in #include statements

Solutions:

  1. Use Visual Studio IDE (handles include paths correctly)
  2. Ensure Property Sheets (.props) are imported
  3. Check AdditionalIncludeDirectories in project settings

Issue 3: Precompiled Header Errors

Error:

error C2857: #include statement specified with the /Ycstdafx.h command-line option was not found

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:

error LNK2019: unresolved external symbol

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

  1. Open .sln file in Visual Studio
  2. Select configuration from toolbar (Debug/Release, Win32/x64)
  3. Build → Build Solution (Ctrl+Shift+B)
  4. View errors in Error List window (Ctrl+\, E)

Best Practices

  1. Always use /m for parallel builds - Significantly faster on multi-core systems
  2. Start with minimal verbosity - Use /v:m, increase only when debugging
  3. Clean build after major changes - Delete Debug/ or Release/ folders
  4. Build dependencies first - Core libs → Network → Common → Executables
  5. Check Property Sheets - Ensure .props files are correctly imported

Safety Notes

  • Never modify .vcxproj files 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:

📋 Build Plan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Solution: Project/Server/Project.sln
Target: WorldServer
Configuration: Debug | Win32
Parallel: Yes (/m)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Finding MSBuild...
✓ Found: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
Version: 17.14.40

Executing build...
MSBuild Project.sln /t:WorldServer /p:Configuration=Debug /p:Platform=Win32 /m /v:minimal

Build Results:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ LibClient.lib
✓ Network.lib
✓ Database.lib
✓ Common.lib
✓ WorldServer.exe

Build succeeded with 0 errors, 3 warnings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

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/

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.