Skip to content

Commit c1c9885

Browse files
committed
blazor wasm detection works?
1 parent eee4fb4 commit c1c9885

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</PropertyGroup>
4242

4343
<PropertyGroup>
44-
<DefineConstants Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)'=='true'">$(DefineConstants);_SENTRY_BLAZOR_WASM</DefineConstants>
44+
<DefineConstants Condition="'$(UsingSentryBlazorWebAssemblySdk)'=='true'">$(DefineConstants);_SENTRY_BLAZOR_WASM</DefineConstants>
4545
</PropertyGroup>
4646

4747
<PropertyGroup>

src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
<ItemGroup>
99
<ProjectReference Include="..\Sentry.Extensions.Logging\Sentry.Extensions.Logging.csproj" />
10-
<ProjectReference Include="..\Sentry\Sentry.csproj" />
10+
<ProjectReference Include="..\Sentry\Sentry.csproj">
11+
<AdditionalProperties>UsingSentryBlazorWebAssemblySdk=true</AdditionalProperties>
12+
</ProjectReference>
1113
</ItemGroup>
1214

1315
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
88
Note:Target framework conditions should be kept synchronized with src/Sentry/buildTransitive/Sentry.Native.targets -->
99
<Project>
10-
1110
<!-- Helpful properties copied from Sentry.props -->
1211
<PropertyGroup Condition="'$(TargetFramework)' != ''">
1312
<_SentryTargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkVersion($(TargetFramework)))</_SentryTargetFrameworkVersion>

src/Sentry/SentrySdk.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ internal static IHub InitHub(SentryOptions options)
6969
InitSentryCocoaSdk(options);
7070
#elif ANDROID
7171
InitSentryAndroidSdk(options);
72-
#elif NET8_0_OR_GREATER
72+
#elif NET8_0_OR_GREATER && !_SENTRY_BLAZOR_WASM
7373
// TODO: Is this working properly? Currently we don't have any way to check if the app is being compiled AOT
7474
// All we know is whether trimming has been enabled or not. I think at the moment we'll be initialising
7575
// SentryNative for managed applications when they've been trimmed!

0 commit comments

Comments
 (0)