# 🔧 Copilot CLI now prepares MSBuild C++ project context automatically

AI Today · published 2026-11-10T23:35:57Z · https://ai-today.com/product/609f0fc9-ccd5-432c-88f7-e981d1ea664d?lang=en

- 🆕 Microsoft’s C++ language server now generates MSBuild configuration for Copilot CLI automatically.
- 📂 It reads project files to collect include paths, macros and compiler options.
- 🧠 The AI gains project-aware context for symbols, definitions and callers.
- 🚧 CMake and other build systems still need their own configuration route.

💻 Microsoft is automating a preparation step for C++ work in Copilot CLI. For MSBuild projects, the C++ language server reads the project configuration and generates the required compilation database itself. The agent can then find definitions, references and callers using the project’s actual build settings. Previously, it first had to discover and explicitly run the relevant setup skill. The change applies to MSBuild; other systems, including CMake, still need suitable configuration.

Understanding C++ code often requires knowing how it is compiled. Include paths, macros and compiler options determine which files are used and which portions of code are active. A language server brings this information together so development tools can find a function’s definition or its callers. An AI agent can use that context to make more targeted changes.

📦 The new MSBuild integration automatically produces a compilation database called compile_commands.json. Its bundled extractor reads Visual C++ project files and property sheets to collect the settings used for individual source files. Extraction runs in the background at startup or when needed. Its duration depends on project size.

⚙️ Previously, Copilot had to discover and invoke the relevant setup skill before obtaining this information. Microsoft moves that work into the language-server integration. This removes a manual or agent-directed setup action and makes usable project context available earlier.

📜 Users can inspect language-server logs through “/lsp logs” when investigating a problem. Timeouts and automatic extraction can be configured. Existing language-server installation and licence requirements remain in place. CMake and other build systems continue to use their respective routes for supplying compilation settings; the automatic extraction is tailored to MSBuild.

## Sources

- [Automatic MSBuild configuration for the Microsoft C++ language server in Copilot CLI](https://devblogs.microsoft.com/cppblog/automatic-msbuild-configuration-for-the-microsoft-c-language-server-in-copilot-cli/)

---
This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources.
