Commit 2b6c1eb
fix(pack): make Reactor.csproj find analyzer DLL at platform-qualified path
Backs out the AppendPlatformToOutputPath=false approach (which broke
unit tests with CS2012 file-lock contention on
Reactor.Localization.Generator/obj/Debug/netstandard2.0/...) in favor
of teaching Reactor.csproj's <None Include> globs about the inherited-
Platform layout.
The cause of the original clean-machine pack failure is unchanged:
when mur pack-local runs `dotnet pack -p:Platform=x64` (or ARM64), the
inherited Platform cascades to the transitive Reactor.Analyzers and
Reactor.Localization.Generator builds, which then land at
bin\<Platform>\<Configuration>\netstandard2.0\. But Reactor.csproj's
pack glob hardcoded bin\<Configuration>\netstandard2.0\ (no Platform
segment), so pack couldn't find the file on a freshly-cloned machine.
Pinning AppendPlatformToOutputPath=false on the analyzers fixed
pack-local but removed bin/obj segregation across Platform values,
which let two concurrent transitive compiles (e.g. dotnet test +
ProjectReference deduplication race) collide on the same
obj\Debug\netstandard2.0\ output path. CI Unit Tests caught this with:
CSC : error CS2012: Cannot open '...obj\Debug\netstandard2.0\
Reactor.Localization.Generator.dll' for writing -- The process
cannot access the file ... because it is being used by another
process.
New approach: Reactor.csproj computes
$(_ReactorAnalyzerBinDir) = bin\<Configuration>\netstandard2.0
when Platform is empty or AnyCPU, OR
= bin\<Platform>\<Configuration>\netstandard2.0
when Platform is x64 / ARM64.
Pack now finds the analyzers in either layout. The analyzer csprojs
go back to their stock SDK behavior, preserving per-Platform obj/bin
segregation that prevents the build-graph race.
Verified locally:
- mur pack-local from a wiped bin/obj tree succeeds on ARM64 host
(analyzers land in bin\ARM64\Debug\, Reactor.csproj finds them).
- Plain dotnet build src/Reactor (no -p:Platform) would land
analyzers at bin\Debug\, also found by the conditional binding.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent dee53ef commit 2b6c1eb
3 files changed
Lines changed: 16 additions & 19 deletions
File tree
- src
- Reactor.Analyzers
- Reactor.Localization.Generator
- Reactor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 15 | | |
27 | 16 | | |
28 | 17 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | | - | |
| 120 | + | |
107 | 121 | | |
108 | | - | |
| 122 | + | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
| |||
0 commit comments