Skip to content

fix: Builds failing intermittently on Windows #4146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025
Merged

fix: Builds failing intermittently on Windows #4146

merged 4 commits into from
Apr 28, 2025

Conversation

jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Apr 27, 2025

Resolves #4091:

Explanation

Previously we had this build target in Sentry.Android.AssemblyReader.Tests.csproj:

<!-- Build the Android test app in various configurations during the build of this test project. -->
<Target Name="BuildTestAPKs" BeforeTargets="DispatchToInnerBuilds;BeforeBuild" Condition="'$(TargetPlatformIdentifier)' != 'android'">
<MSBuild Projects="..\AndroidTestApp\AndroidTestApp.csproj" Targets="Restore" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerBuildTestAPKs" Properties="TargetFramework=net8.0-android" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerBuildTestAPKs" Properties="TargetFramework=net9.0-android" />
</Target>

It was building for both the net8.0-android and net9.0-android targets... however it also gets called for both the net8.0 and net9.0 TFMs for Sentry.Android.AssemblyReader.Tests.csproj. So essentially it's duplicated and sometimes on Windows that results in two instances of the task trying to write to the same files - leading to a permission denied error.

#skip-changelog

@jamescrosswell jamescrosswell marked this pull request as ready for review April 28, 2025 02:09
@jamescrosswell jamescrosswell merged commit a9a6811 into main Apr 28, 2025
32 checks passed
@jamescrosswell jamescrosswell deleted the fix-4091 branch April 28, 2025 08:26
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.

Windows builds are failing intermittently on CI
3 participants