Summary
When the dotnet_project tool's Build action fails, the response includes a structured summary with error/warning counts but does not include the actual compiler error messages. This forces the caller to fall back to running dotnet build via the terminal to extract the error text.
Reproduction
- Introduce a compile error (e.g., use an unresolved type like
IRenderable without the required using directive)
- Call the MCP
dotnet_project Build action
- Observe the response:
{
"action": "build",
"buildResult": {
"success": false,
"project": "...",
"configuration": "Debug",
"warningCount": 0,
"errorCount": 1,
"summary": "Build FAILED (1 errors, 0 warnings)"
}
}
Expected behavior
The response should include the actual error messages, e.g.:
{
"action": "build",
"buildResult": {
"success": false,
"project": "...",
"configuration": "Debug",
"warningCount": 0,
"errorCount": 1,
"summary": "Build FAILED (1 errors, 0 warnings)",
"errors": [
{
"file": "NewsletterApp.Rendering.cs",
"line": 9,
"column": 51,
"code": "CS0246",
"message": "The type or namespace name 'IRenderable' could not be found (are you missing a using directive or an assembly reference?)"
}
]
}
}
Impact
Without errors in the response, the AI agent cannot diagnose and fix build failures using only the MCP tool - it must fall back to parsing raw CLI output, which defeats the purpose of the structured MCP interface.
This also applies to warnings when warningCount > 0.
Context
Encountered while upgrading Spectre.Console from 0.54.0 to 0.55.0 in another project. The new version moved IRenderable to the Spectre.Console.Rendering namespace, causing a CS0246. The MCP Build response told me the build failed but not why.
Summary
When the
dotnet_projecttool'sBuildaction fails, the response includes a structured summary with error/warning counts but does not include the actual compiler error messages. This forces the caller to fall back to runningdotnet buildvia the terminal to extract the error text.Reproduction
IRenderablewithout the requiredusingdirective)dotnet_projectBuild action{ "action": "build", "buildResult": { "success": false, "project": "...", "configuration": "Debug", "warningCount": 0, "errorCount": 1, "summary": "Build FAILED (1 errors, 0 warnings)" } }Expected behavior
The response should include the actual error messages, e.g.:
{ "action": "build", "buildResult": { "success": false, "project": "...", "configuration": "Debug", "warningCount": 0, "errorCount": 1, "summary": "Build FAILED (1 errors, 0 warnings)", "errors": [ { "file": "NewsletterApp.Rendering.cs", "line": 9, "column": 51, "code": "CS0246", "message": "The type or namespace name 'IRenderable' could not be found (are you missing a using directive or an assembly reference?)" } ] } }Impact
Without errors in the response, the AI agent cannot diagnose and fix build failures using only the MCP tool - it must fall back to parsing raw CLI output, which defeats the purpose of the structured MCP interface.
This also applies to warnings when
warningCount > 0.Context
Encountered while upgrading Spectre.Console from 0.54.0 to 0.55.0 in another project. The new version moved
IRenderableto theSpectre.Console.Renderingnamespace, causing aCS0246. The MCP Build response told me the build failed but not why.