Skip to content

MSBuild / .NET project, resource and manifest files are unmapped — .csproj, .props, .resx, .plist, .xaml are never indexed or searchable #2229

Description

@yasmoradi

Version

codebase-memory-mcp 0.11.0

Platform

Linux (x64) — also reproduced with the npm build on Windows (x64)

Install channel

Built from source

Binary variant

standard

What happened, and what did you expect?

EXT_TABLE in src/discover/language.c maps .xml, .xsd, .xsl and .svg to CBM_LANG_XML, but none of the XML documents that make up a .NET repository's project system are mapped:

.csproj .vbproj .fsproj .props .targets .nuspec .slnx .runsettings .resx .xaml .axaml .plist .xcprivacy .manifest .appxmanifest

They are all well-formed XML, the grammar for them is already vendored and already wired up (internal/cbm/lang_specs.c:2018), and they carry the facts an agent is most often asked for about a .NET codebase — which packages a project references and at which version, what it targets, which localized strings exist, what an app declares in its manifest.

Because they are unmapped, they are not indexed, and since search_code only greps indexed files, their content cannot be reached by any tool. This is the same class of gap that .mjs/.cjs had in #197 and .razor had before it.

It is silent, too: the files do not show up in not_indexed_files_count or skipped_count, so nothing in the output says they were passed over.

Expected: these extensions resolve to CBM_LANG_XML, exactly as .svg and .xsd already do, so the files are indexed and greppable.

Reproduction

A four-file dummy repository:

mkdir ~/fx && cd ~/fx && git init -q .

cat > App.csproj <<'EOF'
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Serilog" />
  </ItemGroup>
</Project>
EOF

cat > Directory.Packages.props <<'EOF'
<Project>
  <ItemGroup>
    <PackageVersion Include="Serilog" Version="4.2.0" />
  </ItemGroup>
</Project>
EOF

cat > Strings.resx <<'EOF'
<root>
  <data name="WelcomeTitle"><value>Welcome</value></data>
</root>
EOF

echo 'class Program { static void Main() { } }' > Program.cs

git add -A && git commit -qm init

Index it, then grep for something that only lives in the XML files:

$ codebase-memory-mcp cli --quiet index_repository --repo-path ~/fx
{"project":"home-dev-fx", ... ,"not_indexed_files_count":0,"skipped_count":0,
 "parse_partial_count":0,"parse_unusable_count":0,"nodes":6,"edges":6,"status":"indexed"}

$ codebase-memory-mcp cli --quiet search_code --project fx --pattern Main
total_grep_matches: 1          # Program.cs was read

$ codebase-memory-mcp cli --quiet search_code --project fx --pattern PackageReference
total_grep_matches: 0

$ codebase-memory-mcp cli --quiet search_code --project fx --pattern TargetFramework
total_grep_matches: 0

$ codebase-memory-mcp cli --quiet search_code --project fx --pattern WelcomeTitle
total_grep_matches: 0

Six nodes for four files: only Program.cs was read. PackageReference, TargetFramework and WelcomeTitle are each present verbatim on disk and return nothing, while Main from the one mapped file returns its match.

On a real repository

bitfoundation/bitplatform (public, MIT, ~10.1k tracked files) loses 189 files to this, every one of them plain XML:

Extension Files What is lost
.csproj 102 package references, target frameworks, per-project build config
.resx 30 every localized UI string, in 10 languages
.slnx 15 solution layout
.plist 13 iOS / macOS app declarations
.xaml 9 MAUI / WinUI views
.props 7 central package versions (Directory.Packages.props)
.targets 3 build hooks shipped to consumers
.appxmanifest 3 MSIX package identity
.manifest 3 Win32 side-by-side manifests
.xcprivacy 2 Apple privacy manifests
.runsettings 2 test run configuration

A concrete question an agent cannot answer there today: "which NuGet packages does this repository reference, and at what versions?" — every answer lives in .csproj and Directory.Packages.props.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

~10.1k tracked files, 189 of them affected.

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Happy to send the PR — it is an EXT_TABLE addition in src/discover/language.c plus tests/test_language.c cases, no new grammar and no new CBM_LANG_* value.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.ux/behaviorDisplay bugs, docs, adoption UXwindowsWindows-specific issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions