fix: enable Windows long path support in GitHub Actions#4648
Merged
Conversation
Resolves PathTooLongException errors on Windows CI by enabling long path support (>260 characters) via registry setting. This allows the source generator to create files with long names for complex generic method signatures without hitting Windows MAX_PATH limitation. Fixes: https://github.com/thomhurst/TUnit/actions/runs/21610514651
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. This is a clean solution to the Windows long path issue. Enabling long path support at the system level is the right approach rather than working around it in the source generator. |
|
Will this force users to also use long paths to avoid potential issues? Could your CI now hide issues that users would run into otherwise? |
This was referenced Feb 5, 2026
This was referenced Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes PathTooLongException errors on Windows CI by enabling long path support (>260 characters) via registry setting.
Problem
Windows CI was failing with:
This occurred during source generation for test methods with complex generic signatures like
GenericMethodTests.AggregateBy_HasExpectedOutput<TSource, TKey, TAccumulate>(...).Solution
Enable Windows long path support in GitHub Actions by setting the
LongPathsEnabledregistry key before building. This is a cleaner solution than modifying source generator code to hash long filenames.Test Plan
Fixes: https://github.com/thomhurst/TUnit/actions/runs/21610514651