Skip to content

fix(build): build SW.Bitween.Web once per solution build - #371

Merged
MusaMisto merged 1 commit into
releases/r10.0-developfrom
musa/fix/web-built-once
Oct 12, 2026
Merged

MusaMisto merged 1 commit into
releases/r10.0-developfrom
musa/fix/web-built-once

Conversation

@MusaMisto

Copy link
Copy Markdown
Member

Problem

The develop pipeline's test build fails now and then with:

error MSB4018: The "DefineStaticWebAssets" task failed unexpectedly.
System.IO.IOException: The process cannot access the file '.../SW.Bitween.Web/obj/Release/net10.0/rpswa.dswa.cache.json' because it is being used by another process.

This happened in runs #118, #136, #140 and #149. Every one of them included 5b68bb7 (the HTTP tests), and none of the runs before it failed this way.

Cause

SW.Bitween.HttpTests referenced the web project with <Properties>SkipClientBuild=true</Properties>. MSBuild builds a project once for each set of global properties. The shared dotnet-build action builds the solution without that property, so SW.Bitween.Web was built twice, in parallel, into the same obj folder. When the two builds overlap, they collide on the static web assets cache.

The PR checks pass -p:SkipClientBuild=true to every project, so there the two builds are the same build, and the race never showed.

The property didn't skip anything. BuildClientApp runs after ComputeFilesToPublish, and a project reference never runs that target. The <SkipClientBuild> in HttpTests' own PropertyGroup doesn't reach the web project at all.

Change

Remove both properties, and add a comment on the reference saying why it carries none.

Evidence

I ran a throwaway workflow (now deleted) that runs the action's own dotnet restore + dotnet build SW.Bitween.sln --configuration Release:

SW.Bitween.Web -> lines yarn runs HttpTests
this change 1 0 314 passed, 4 failed
original csproj (control) 2 0 314 passed, 4 failed

The develop run #148 log also shows two SW.Bitween.Web -> .../bin/Release/net10.0/SW.Bitween.Web.dll lines, 23 s apart; the PR checks log shows one.

The 4 HttpTests failures happen with and without this change, for example BackgroundTests.The_system_jobs_are_scheduled_and_say_when_they_run_next. CI doesn't run HttpTests.

SW.Bitween.HttpTests referenced the web project with
<Properties>SkipClientBuild=true</Properties>. MSBuild builds a project once
per set of global properties, so a solution build without that property (the
shared dotnet-build action) built SW.Bitween.Web twice, in parallel, into the
same obj folder. The two runs of DefineStaticWebAssets then collided on
rpswa.dswa.cache.json ("being used by another process"), failing the build
now and then since the HTTP tests landed: runs #118, #136, #140 and #149.

The property skipped nothing: BuildClientApp runs after
ComputeFilesToPublish, which a project reference never runs. The PR checks
pass -p:SkipClientBuild=true to every project, so there the two builds were
one and the race never showed.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (8)
  • ^main$
  • ^master$
  • ^staging$
  • ^development$
  • ^gigstaging$
  • ^develop$
  • ^releases$
  • ^releases/r10.0$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: simplify9/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1c960620-91ff-4f44-8065-1a2ba8bb615f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MusaMisto
MusaMisto merged commit 34c9faf into releases/r10.0-develop Oct 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant