C# Dev Kit writes an untracked runfile-discovery cache into the workspace
Environment
- VS Code with Dev Containers
- C# Dev Kit 3.20.207
- C# extension 2.140.9
- Generic Debian-based Dev Container
- .NET SDK 10.0.400
- Linux host with Docker Desktop
Reproduction
A minimal standalone workspace contains:
.devcontainer/devcontainer.json
Repro.csproj
Program.cs
The Dev Container enables the .NET feature and the ms-dotnettools.csdevkit extension.
The complete repro files are:
.devcontainer/devcontainer.json
{
"name": "C# Dev Kit runfile cache repro",
"image": "mcr.microsoft.com/devcontainers/base:debian13",
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "10.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit"
]
}
},
"remoteUser": "vscode"
}
Repro.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
Program.cs
Console.WriteLine("C# Dev Kit runfile discovery repro");
After opening the workspace in its own Dev Container and waiting for C# Dev Kit project discovery to finish:
git status --short --untracked-files=all
find . -path '*runfile-discovery*' -o -name 'cache.staging.json'
Actual behavior
C# Dev Kit creates this untracked file beneath the workspace:
dotnet/runfile-discovery/<opaque-workspace-id>/cache.staging.json
Docker Desktop confirms that the container has only the normal workspace bind mount. The cache is created inside the workspace, not through an additional host mount.
The cache contains project-discovery metadata, including the workspace path and discovered project information.
Expected behavior
Project-discovery cache data should be stored in extension or user cache storage outside the repository workspace, or be excluded from Git automatically.
Impact
Repositories opened with this configuration receive an unexpected generated file under their working tree. Users must discover and ignore an undocumented tool-generated directory manually.
C# Dev Kit writes an untracked runfile-discovery cache into the workspace
Environment
Reproduction
A minimal standalone workspace contains:
The Dev Container enables the .NET feature and the
ms-dotnettools.csdevkitextension.The complete repro files are:
.devcontainer/devcontainer.json{ "name": "C# Dev Kit runfile cache repro", "image": "mcr.microsoft.com/devcontainers/base:debian13", "features": { "ghcr.io/devcontainers/features/dotnet:2": { "version": "10.0" } }, "customizations": { "vscode": { "extensions": [ "ms-dotnettools.csdevkit" ] } }, "remoteUser": "vscode" }Repro.csprojProgram.csAfter opening the workspace in its own Dev Container and waiting for C# Dev Kit project discovery to finish:
Actual behavior
C# Dev Kit creates this untracked file beneath the workspace:
Docker Desktop confirms that the container has only the normal workspace bind mount. The cache is created inside the workspace, not through an additional host mount.
The cache contains project-discovery metadata, including the workspace path and discovered project information.
Expected behavior
Project-discovery cache data should be stored in extension or user cache storage outside the repository workspace, or be excluded from Git automatically.
Impact
Repositories opened with this configuration receive an unexpected generated file under their working tree. Users must discover and ignore an undocumented tool-generated directory manually.