Skip to content

Commit a97dc18

Browse files
committed
fix: build with Visual Studio
> Sentry.Native.targets(37,14): error MSB4186: Invalid static method invocation syntax: > "[System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier". > Method 'System.Runtime.InteropServices.RuntimeInformation.RuntimeIdentifier' not found. > Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). > Check that all parameters are defined, are of the correct type, and are specified in the right order.
1 parent 01c6b86 commit a97dc18

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,35 @@
3434
</ItemGroup>
3535

3636
<!-- Packaging the native library (NOTE: $(RuntimeIdentifier) is not set) -->
37-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'win-x64'">
37+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(NETCoreSdkRuntimeIdentifier)' == 'win-x64'">
3838
<None Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib">
3939
<Pack>true</Pack>
4040
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-x64)</PackagePath>
4141
</None>
4242
</ItemGroup>
4343

44-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'win-arm64'">
44+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(NETCoreSdkRuntimeIdentifier)' == 'win-arm64'">
4545
<None Include="$(SentryNativeOutputDirectory-win-arm64)$(SentryNativeLibraryName).lib">
4646
<Pack>true</Pack>
4747
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-arm64)</PackagePath>
4848
</None>
4949
</ItemGroup>
5050

51-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-x64'">
51+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(NETCoreSdkRuntimeIdentifier)' == 'linux-x64'">
5252
<None Include="$(SentryNativeOutputDirectory-linux-x64)lib$(SentryNativeLibraryName).a">
5353
<Pack>true</Pack>
5454
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-x64)</PackagePath>
5555
</None>
5656
</ItemGroup>
5757

58-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-musl-x64'">
58+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(NETCoreSdkRuntimeIdentifier)' == 'linux-musl-x64'">
5959
<None Include="$(SentryNativeOutputDirectory-linux-musl-x64)lib$(SentryNativeLibraryName).a">
6060
<Pack>true</Pack>
6161
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-musl-x64)</PackagePath>
6262
</None>
6363
</ItemGroup>
6464

65-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-arm64'">
65+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(NETCoreSdkRuntimeIdentifier)' == 'linux-arm64'">
6666
<None Include="$(SentryNativeOutputDirectory-linux-arm64)lib$(SentryNativeLibraryName).a">
6767
<Pack>true</Pack>
6868
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-arm64)</PackagePath>

0 commit comments

Comments
 (0)