Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Move setting /NODEFAULTLIB:MSVCRT LinkerArg to windows-specific targe…
…ts in Sentry.Native.targets

Before the flag was added even if you built for an android RID on windows, causing an error.
  • Loading branch information
akoeplinger authored Nov 21, 2025
commit ec5ee8abd8aff78210f844c57dc354a1f9b52fe3
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and ('$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64')">
<DirectPInvoke Include="sentry-native" />
<!-- See: https://github.com/getsentry/sentry-dotnet/pull/4111 -->
<LinkerArg Include="/NODEFAULTLIB:MSVCRT" />
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\$(RuntimeIdentifier)\sentry-native.lib" />
<NativeLibrary Include="dbghelp.lib" />
<NativeLibrary Include="winhttp.lib" />
Expand Down
5 changes: 0 additions & 5 deletions src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
<Error Text="Android projects using Sentry cannot build using AndroidEnableAssemblyCompression = false due to a Microsoft issue. Please follow https://github.com/dotnet/android/issues/9752" />
</Target>

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'">
<!-- See: https://github.com/getsentry/sentry-dotnet/pull/4111 -->
<LinkerArg Include="/NODEFAULTLIB:MSVCRT" />
</ItemGroup>

<Target Name="WriteSentryAttributes"
Condition="$(Language) == 'VB' or $(Language) == 'C#' or $(Language) == 'F#'"
BeforeTargets="BeforeCompile;CoreCompile"
Expand Down
Loading