Skip to content

Commit 7645341

Browse files
Disable sentry-native for WASM applications (#4631)
Resolves #4550 - #4550
1 parent 9d1b4fe commit 7645341

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
### Fixes
1717

1818
- The SDK avoids redundant scope sync after transaction finish ([#4623](https://github.com/getsentry/sentry-dotnet/pull/4623))
19+
- sentry-native is now automatically disabled for WASM applications ([#4631](https://github.com/getsentry/sentry-dotnet/pull/4631))
1920

2021
## 6.0.0-preview.1
2122

src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<FrameworkSupportsNative Condition="'$(RuntimeIdentifier)' == 'osx-x64' or '$(RuntimeIdentifier)' == 'osx-arm64'">true</FrameworkSupportsNative>
2525
<!-- net8.0 or greater -->
2626
<FrameworkSupportsNative Condition="'$(_SentryIsNet8OrGreater)' != 'true' or !('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">false</FrameworkSupportsNative>
27+
<!-- WASM -->
28+
<FrameworkSupportsNative Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true'">false</FrameworkSupportsNative>
2729
<!-- Make it opt-in/out -->
2830
<FrameworkSupportsNative Condition="'$(SentryNative)' == 'true' or '$(SentryNative)' == 'enable'">true</FrameworkSupportsNative>
2931
<FrameworkSupportsNative Condition="'$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'">false</FrameworkSupportsNative>

src/Sentry/buildTransitive/Sentry.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<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" />
2828
</Target>
2929

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

0 commit comments

Comments
 (0)