-
-
Notifications
You must be signed in to change notification settings - Fork 210
/
Sentry.csproj
176 lines (154 loc) · 11.6 KB
/
Sentry.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Official SDK for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
<NoWarn Condition="'$(TargetFramework)' == 'netstandard2.0'">$(NoWarn);RS0017</NoWarn>
<CLSCompliant Condition="'$(TargetPlatformIdentifier)' == ''">true</CLSCompliant>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
<TargetFrameworks>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(SolutionName)' == 'Sentry.Unity'">
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>
<!-- Platform-specific props included here -->
<Import Project="Platforms\Android\Sentry.Android.props" Condition="'$(TargetPlatformIdentifier)' == 'android'" />
<Import Project="Platforms\iOS\Sentry.iOS.props" Condition="'$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />
<Import Project="Platforms\Native\Sentry.Native.targets" Condition="'$(TargetFramework)' == 'net6.0'" /> <!-- TODO use net7.0 instead, if we add that as a TF. -->
<PropertyGroup Condition="'$(FrameworkSupportsAot)' == 'true'">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<PropertyGroup>
<!-- Adding any condition directly in the Link tag results in a NETSDK1022 error due to the order or evaluation -->
<BenDemystifierLink>%(RecursiveDir)\%(Filename)%(Extension)</BenDemystifierLink>
</PropertyGroup>
<Target Name="IncludeBenDemystifier" BeforeTargets="BeforeBuild">
<!--
Ben.Demystifier is compiled directly into Sentry.
Note: It uses Microsoft.Bcl.AsyncInterfaces, which we get transitively from System.Text.Json.
-->
<ItemGroup>
<Compile Include="..\..\modules\Ben.Demystifier\src\**\*.cs">
<Link>$(BenDemystifierLink)</Link>
</Compile>
<Compile Remove="..\..\modules\Ben.Demystifier\**\obj\**" />
</ItemGroup>
<!-- Ben.Demystifier also needs System.Reflection.Metadata 5.0.0 or higher on all platforms. -->
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4'))">
<PackageReference Include="System.Reflection.Metadata" Version="5.0.0" />
</ItemGroup>
</Target>
<!-- Sentry.DiagnosticSource is compiled directly into Sentry for .NET Core and .NET targets only. -->
<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard')) and !$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);HAS_DIAGNOSTIC_INTEGRATION</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('netstandard')) and !$(TargetFramework.StartsWith('net4'))">
<Compile Include="..\Sentry.DiagnosticSource\Internal\**\*.cs">
<Link>Internal\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>
<!--
We use Simon Cropp's Polyfill source-only package to access APIs in lower targets.
https://github.com/SimonCropp/Polyfill
-->
<ItemGroup>
<PackageReference Include="Polyfill" Version="1.23.0" PrivateAssets="all" />
</ItemGroup>
<!--
On .NET Framework, we need a package reference to System.Runtime.InteropServices.RuntimeInformation.
This is used in Sentry.PlatformAbstractions.RuntimeInfo. It's already built-in for all other targets.
-->
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
</ItemGroup>
<!-- On .NET Framework, we need an assembly reference to System.Net.Http. -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="System.Net.Http" />
</ItemGroup>
<!-- Ensure at least version 6 of System.Text.Json so we have JsonSerializationContext available -->
<ItemGroup Condition="!$(TargetFramework.StartsWith('net6')) and !$(TargetFramework.StartsWith('net7')) and !$(TargetFramework.StartsWith('net8'))">
<PackageReference Include="System.Text.Json" Version="6.0.8" />
</ItemGroup>
<!--
Include Sentry's custom targets file in the nuget package.
This file contains targets that are invoked during the end-user's build.
The same file is included twice, so it ends up being used for both direct and transitive package references to Sentry.
-->
<ItemGroup>
<None Include="buildTransitive\Sentry.targets" Pack="true" PackagePath="buildTransitive\Sentry.targets" />
<None Include="buildTransitive\Sentry.targets" Pack="true" PackagePath="build\Sentry.targets" />
</ItemGroup>
<!-- Download the Sentry CLI during the restore phase. -->
<Target Name="DownloadSentryCLI" BeforeTargets="CollectPackageReferences" Condition="'$(SentryCLIDirectory)' != ''">
<!--
Hashes are from https://release-registry.services.sentry.io/apps/sentry-cli/latest
Update with each new version.
-->
<PropertyGroup>
<_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture>
</PropertyGroup>
<ItemGroup>
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Darwin-arm64" FileHash="e8a9c4849e72b05c8b7c0ecfdd4fded04a312cb39870c16e7fa18c627e1398d3" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Darwin-x86_64" FileHash="88ba4a057db6169ca18ce342db8f8593222b3cec842cd8698a8767397b1c4eb1" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Linux-aarch64" FileHash="aa6085a9b24e349dbcef301127aebc6e8c3adfa8389964df5e91d96b3fb92e08" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Linux-i686" FileHash="f354aaa0c4942820ed5c342a384c23dc077ccdd106dcb858d966812e3757c8ed" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Linux-x86_64" FileHash="0016d21b20d6b83fe10d514d10ca1dbed854e8694d71fada9749e702730ed728" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Windows-i686.exe" FileHash="2060d806c12d7f71e43c860973a18609f075a6b17c8875fc058398f61f35215d" />
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) != 'X86')" Include="sentry-cli-Windows-x86_64.exe" FileHash="53d48d3da7b24b04f686b75195eb18250b743999841f6305dab2a40443925ca4" />
</ItemGroup>
<!-- Download the files -->
<DownloadFile SourceUrl="https://downloads.sentry-cdn.com/sentry-cli/$(SentryCLIVersion)/%(SentryCLIDownload.Identity)" DestinationFolder="$(SentryCLIDirectory)" Condition="!Exists('$(SentryCLIDirectory)%(Identity)')" Retries="3">
<Output TaskParameter="DownloadedFile" ItemName="SentryCLIDownloadedFile" />
</DownloadFile>
<!-- Build will fail if any downloaded files don't match the expected hash. -->
<VerifyFileHash File="$(SentryCLIDirectory)%(SentryCLIDownload.Identity)" Hash="%(FileHash)" />
<!-- Set executable permissions for local usage. -->
<Exec Command="chmod +x $(SentryCLIDirectory)*" Condition="!$([MSBuild]::IsOSPlatform('Windows'))" />
</Target>
<!-- Bundle the Sentry CLI into the Sentry Nuget package. -->
<ItemGroup Condition="'$(SentryCLIDirectory)' != ''">
<None Include="$(SentryCLIDirectory)**" Pack="true" PackagePath="tools\" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Sentry.Android.AssemblyReader.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNet" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNet.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNetCore" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNetCore.Grpc" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNetCore.Grpc.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNetCore.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.AspNetCore.TestUtils" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Azure.Functions.Worker" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Azure.Functions.Worker.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Benchmarks" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.DiagnosticSource" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.DiagnosticSource.IntegrationTests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.DiagnosticSource.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.EntityFramework" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.EntityFramework.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Extensions.Logging" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Extensions.Logging.EfCore.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Extensions.Logging.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.GraphQL.Client" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.GraphQL.Client.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Google.Cloud.Functions" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Google.Cloud.Functions.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Log4Net" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Log4Net.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Maui" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Maui.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.NLog" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.NLog.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.OpenTelemetry" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.OpenTelemetry.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Profiling" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Profiling.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Serilog" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Serilog.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Testing" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Tests" PublicKey="$(SentryPublicKey)" />
</ItemGroup>
</Project>