Skip to content

Fix BA2022 verification for long paths - #1214

Merged
Martin Řezník (martin-reznik) merged 1 commit into
microsoft:fix/ba2022-long-pathsfrom
akoeplinger:fix/ba2022-long-paths
Aug 24, 2026
Merged

Fix BA2022 verification for long paths#1214
Martin Řezník (martin-reznik) merged 1 commit into
microsoft:fix/ba2022-long-pathsfrom
akoeplinger:fix/ba2022-long-paths

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

Enable long-path awareness for BinSkim and its test host, and add a regression test for signed binaries beyond MAX_PATH.

Fixes #977

Enable long-path awareness for BinSkim and its test host, and add a regression test for signed binaries beyond MAX_PATH.

Fixes microsoft#977

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
finally
{
continue;
context.Dispose();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was needed since otherwise the context was leaking and keeping file handles open

<PackageVersion Include="FluentAssertions" Version="7.0.0" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was needed since the testhost binary itself was made longPathAware in that version

@martin-reznik
Martin Řezník (martin-reznik) changed the base branch from main to fix/ba2022-long-paths August 24, 2026 13:55
@martin-reznik
Martin Řezník (martin-reznik) merged commit 09e7ff4 into microsoft:fix/ba2022-long-paths Aug 24, 2026
4 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.

Unclear Error message when the path of the file too long

2 participants