Skip to content

chore: Modify csproj-based project build logics - #3235

Open
filzrev wants to merge 8 commits into
dotnet:masterfrom
filzrev:chore-fix-double-write-issue
Open

chore: Modify csproj-based project build logics#3235
filzrev wants to merge 8 commits into
dotnet:masterfrom
filzrev:chore-fix-double-write-issue

Conversation

@filzrev

@filzrev filzrev commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This PR intended to fix #3191.

What's changed in this PR

1. Cherry picks other PR commits

Following PR contents are included

2. Remove DllGatherer related logics

After this PR changes, DllGatherer logics seems not be needed.
So I've removed DllGatherer related logics.

3. Add settings for Autogenerated project.

Modify BenchmarkDotNet.Build.props.txt template.
And enable following settings for Autogenerated project.

  • OutputPath
  • PublishDir

4. Cleanup DotNetCliCommand.cs logics.

Previously, --output and -p:PublishDir command line parameters are used.
These settings are handled as MSBuild Global property and that causing DoubleWrite Issues.

So this PR move these settings to Autogenerated.csproj level.
other projects build outputs are placed under .artifacts directory.

4. Other Changes

  1. Remove ErrorOnDuplicatePublishOutputFiles settings.
  2. Add XmlDocument.SaveAsync helper method for netstandard2.0

Test

Setting ForcedNoDependenciesForIntegrationTests: false version of CI. (InProgress)

@filzrev filzrev changed the title chore: fix double write issue chore: Modify csproj-based project build logics Aug 18, 2026
Comment thread src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs
@filzrev

filzrev commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

I've re-enable <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> setting for WASM project.

Because it cause following errors for xunit.runner.visualstudio package related DLLs.

NETSDK1152: Found multiple publish output files with the same relative path

It seems occurred because xunit.runner.visualstudio package reference has <PrivateAssets>all</PrivateAssets> setting.

@filzrev

filzrev commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Wasm related CI tests are still failed when using ForcedNoDependenciesForIntegrationTests: false setting.

@timcassell

Copy link
Copy Markdown
Collaborator

It seems that xUnit v2 is incompatible with wasm. It's probably fixed by #3232.

@filzrev

filzrev commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Wasm related CI tests are still failed when using ForcedNoDependenciesForIntegrationTests: false setting.

This issue is caused commit 7f18102 is not pushed to target CI branch.

And I've added following commits to avoid issue when using ForcedNoDependenciesForIntegrationTests=false

  • 75973bf (Increase timeout from 1 min to 5 min to avoid timeout)
  • 20fc0fe (Increase job timeout to 720 minutes to avoid job timeout(Default: 360 minutes))
    (This setting is not works on GitHub Actions hosted runner. and timeout at 360 min)

@filzrev
filzrev force-pushed the chore-fix-double-write-issue branch from 20fc0fe to 75973bf Compare August 23, 2026 02:50
@filzrev

filzrev commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

By changing some settings.
It pass CI with ForcedNoDependenciesForIntegrationTests=false setting.

CI: https://github.com/filzrev/BenchmarkDotNet/actions/runs/32571372114/workflow
(windows-latest CI is cancelled because it execution time overs 360 minutes (GitHub Actions hosted-runner limitation))

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.

DoubleWrites message is recorded when using --output parameter on dotnet command

2 participants