Skip to content

Build the tool once in a solution build, so its deps.json has one writer - #91

Merged
Mpdreamz merged 1 commit into
mainfrom
build-race
Nov 14, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
build-race

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

A solution build now builds the tool once. Main's CI failed once because two builds of it wrote assembly-differ.deps.json at the same time.

Prompt summary: Main's CI failed on the commit of #88 while getting assembly-differ to 1.0; this fixes the cause.

Why

The build job failed with MSB4018: The "GenerateDepsFile" task failed unexpectedly ... The process cannot access the file '.../bin/Release/net11.0/assembly-differ.deps.json' because it is being used by another process. The test project references the tool with SetTargetFramework="TargetFramework=net11.0". Since #79 made the tool single-target, that global property makes MSBuild treat the reference as a second instance of the project, which it builds in parallel with the solution's own instance.

What

One instance

The reference keeps only ReferenceOutputAssembly="false", and a comment says why it must carry no global properties. A local dotnet build -c Release -v n shows one build instance of the tool fewer than on main, 2 instead of 3.

Verify

dotnet build -c Release
mise run test

🤖 Generated with Claude Code

Main's build failed once with "The process cannot access the file
assembly-differ.deps.json because it is being used by another process".
The tests' reference to the tool set TargetFramework=net11.0 as a global
property, so MSBuild built the tool a second time, in parallel with the
solution's own build of it. With one target framework since #79 the
property is not needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Mpdreamz Mpdreamz added the ci Build and automation (patch) label Nov 14, 2026
@Mpdreamz
Mpdreamz merged commit 378f3c1 into main Nov 14, 2026
6 of 7 checks passed
@Mpdreamz
Mpdreamz deleted the build-race branch November 14, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Build and automation (patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant