Commit d441488
Fix output-path regressions in the csproj build plumbing
Three defects found reviewing #3235, originally verified against a
console (exe) benchmark project on NativeAotToolchain -- the shape CI
cannot reach, since BenchmarkDotNet.IntegrationTests is a library.
1. DotNetCliCommand: --no-dependencies was widened to every autogenerated
build via a filename check. The generated project keeps its
ProjectReference, and RIDs propagate to exe references but not library
ones, so the reference resolved to a RID-specific ref assembly that
nothing produced (CS0006, plus MSB3243 against the gathered Reference).
Reverted to the previous ForcedNoDependenciesForIntegrationTests gate.
2. GeneratorBase: GetPublishDirectoryPath defaulted to <artifacts>/publish
while the generators expect the executable in their binaries directory.
That was masked while --output overrode PublishDir on the command line;
once PublishDir became authoritative, publish wrote somewhere
BenchmarkDotNet never looks. Default it to the binaries directory.
3. CsProjGenerator: OutputPath was derived by chopping TFM.Length + 1
characters off the binaries path, which is wrong for generators whose
path ends in the RID. Set AppendTargetFrameworkToOutputPath=false in
the generated props instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 649e8a9 commit d441488
4 files changed
Lines changed: 15 additions & 11 deletions
File tree
- src/BenchmarkDotNet
- Templates
- Toolchains
- CsProj
- DotNetCli
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 72 | | |
76 | 73 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
0 commit comments