C# Dev Kit writes an untracked runfile-discovery cache into the workspace

Open
#9,767 1 comment 0 reactions 1 assignee View on GitHub

@RikkiGibson is already working on this.

Since Sep 15, 2026.

Assessment

This issue has not been assessed yet.

Description

Bug Feature - Run File

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.

Dominant language
TypeScript
Stars
3.1k
Forks
736
Avg merge
21h 45m
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/vscode-csharp

All issues in dotnet/vscode-csharp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.