|
13 | 13 | <!-- SentryNative.IsEnabled should result in compile-time constant for trimmed applications --> |
14 | 14 | <!-- Effectively disabling native library --> |
15 | 15 | <RuntimeHostConfigurationOption Include="Sentry.Native.IsEnabled" |
16 | | - Value="$(_SentryNativeEnabled)" |
| 16 | + Condition="'$(FrameworkSupportsNative)' == 'true'" |
17 | 17 | Trim="true" /> |
18 | 18 | </ItemGroup> |
19 | 19 |
|
|
25 | 25 | </PropertyGroup> |
26 | 26 |
|
27 | 27 | <PropertyGroup> |
| 28 | + <!-- Windows --> |
| 29 | + <FrameworkSupportsNative Condition="'$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64'">true</FrameworkSupportsNative> |
| 30 | + <!-- Linux --> |
| 31 | + <FrameworkSupportsNative Condition="'$(RuntimeIdentifier)' == 'linux-x64' or '$(RuntimeIdentifier)' == 'linux-arm64' or '$(RuntimeIdentifier)' == 'linux-musl-x64'">true</FrameworkSupportsNative> |
| 32 | + <!-- macOS --> |
| 33 | + <FrameworkSupportsNative Condition="'$(RuntimeIdentifier)' == 'osx-x64' or '$(RuntimeIdentifier)' == 'osx-arm64'">true</FrameworkSupportsNative> |
28 | 34 | <!-- net8.0 or greater --> |
29 | 35 | <FrameworkSupportsNative Condition="'$(_SentryIsNet8OrGreater)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">true</FrameworkSupportsNative> |
30 | 36 | <!-- Make it opt-out --> |
31 | 37 | <FrameworkSupportsNative Condition="'$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'">false</FrameworkSupportsNative> |
32 | 38 | </PropertyGroup> |
33 | 39 |
|
34 | | - <!-- Whitelist supported runtimes --> |
35 | | - <Choose> |
36 | | - <When Condition="'$(FrameworkSupportsNative)' == 'true'"> |
37 | | - <PropertyGroup> |
38 | | - <_SentryNativeEnabled>false</_SentryNativeEnabled> |
39 | | - <!-- Windows --> |
40 | | - <_SentryNativeEnabled Condition="'$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64'">true</_SentryNativeEnabled> |
41 | | - <!-- Linux --> |
42 | | - <_SentryNativeEnabled Condition="'$(RuntimeIdentifier)' == 'linux-x64' or '$(RuntimeIdentifier)' == 'linux-arm64' or '$(RuntimeIdentifier)' == 'linux-musl-x64'">true</_SentryNativeEnabled> |
43 | | - <!-- macOS --> |
44 | | - <_SentryNativeEnabled Condition="'$(RuntimeIdentifier)' == 'osx-x64' or '$(RuntimeIdentifier)' == 'osx-arm64'">true</_SentryNativeEnabled> |
45 | | - </PropertyGroup> |
46 | | - </When> |
47 | | - <Otherwise> |
48 | | - <PropertyGroup> |
49 | | - <_SentryNativeEnabled>false</_SentryNativeEnabled> |
50 | | - </PropertyGroup> |
51 | | - </Otherwise> |
52 | | - </Choose> |
53 | | - |
54 | 40 | <ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and ('$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64')"> |
55 | 41 | <DirectPInvoke Include="sentry-native" /> |
56 | 42 | <NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\$(RuntimeIdentifier)\sentry-native.lib" /> |
|
0 commit comments