-
-
Notifications
You must be signed in to change notification settings - Fork 229
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
132 lines (108 loc) · 7.35 KB
/
Directory.Build.props
File metadata and controls
132 lines (108 loc) · 7.35 KB
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
<Project>
<PropertyGroup>
<VersionPrefix>6.2.0-alpha.0</VersionPrefix>
<LangVersion>14.0</LangVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory).assets\Sentry.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<Deterministic>true</Deterministic>
<Features>strict</Features>
<ImplicitUsings>true</ImplicitUsings>
<!-- Ignore our own diagnostic ids - these are meant to be external warnings only -->
<NoWarn>$(NoWarn);SENTRY0001</NoWarn>
<NoWarn>$(NoWarn);SENTRYTRACECONNECTEDMETRICS</NoWarn> <!--https://github.com/getsentry/sentry-dotnet/discussions/4838-->
<!-- Allow references to unsigned assemblies (like MAUI) from signed projects -->
<NoWarn>$(NoWarn);CS8002</NoWarn>
<!-- We need to support old stuff. Applications should definitely address these advisory warnings though. -->
<NoWarn>$(NoWarn);NU1902;NU1903</NoWarn>
<!-- https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/dotnet-restore-audit#version-introduced -->
<WarningsNotAsErrors>NU1902;NU1903</WarningsNotAsErrors>
<!-- Centralized TFM versions -->
<LatestTfm>net10.0</LatestTfm>
<PreviousTfm>net9.0</PreviousTfm>
<OldestTfm>net8.0</OldestTfm>
<CurrentTfms>net8.0;net9.0;net10.0</CurrentTfms>
<LatestAndroidTfm>net10.0-android36.0</LatestAndroidTfm>
<PreviousAndroidTfm>net9.0-android35.0</PreviousAndroidTfm>
<LatestIosTfm>net10.0-ios26</LatestIosTfm>
<PreviousIosTfm>net9.0-ios18.0</PreviousIosTfm>
<LatestMacCatalystTfm>net10.0-maccatalyst26</LatestMacCatalystTfm>
<PreviousMacCatalystTfm>net9.0-maccatalyst18.0</PreviousMacCatalystTfm>
<PreviousWindowsTfm>net9.0-windows10.0.19041.0</PreviousWindowsTfm>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Release' And '$(VersionSuffix)' == ''">
<VersionSuffix>dev</VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(SolutionName)' == '.generated.NoMobile'">
<NO_MOBILE>true</NO_MOBILE>
</PropertyGroup>
<!-- NO_MOBILE can be passed in via an environment variable or a build property to disable all mobile targets -->
<PropertyGroup Condition="'$(NO_MOBILE)' == 'true'">
<NO_ANDROID>true</NO_ANDROID>
<NO_IOS>true</NO_IOS>
<NO_MACCATALYST>true</NO_MACCATALYST>
<NO_WINDOWS>true</NO_WINDOWS>
</PropertyGroup>
<!--
Note: The following platform-specific properties need to be set in both Directory.Build.props and Directory.Build.targets.
TODO: Figure out how to consolidate to a single location.
Note: I don't believe we need to set these in the Directory.Build.targets file.
See: https://github.com/jamescrosswell/msbuild-test-4275
-->
<PropertyGroup Condition="'$(TargetFramework)' != ''">
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<!-- This is helpful in code to distinguish neutral targets. -->
<PropertyGroup>
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == ''">$(DefineConstants);PLATFORM_NEUTRAL</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>
</PropertyGroup>
<!-- So we know at build time whether the DSN has been provided in an environment variable or not -->
<PropertyGroup Condition=" '$(SENTRY_DSN)' != '' ">
<DefineConstants>$(DefineConstants);SENTRY_DSN_DEFINED_IN_ENV</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.1" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.15.0" PrivateAssets="All" />
</ItemGroup>
<!-- Import the root global usings, except for samples. -->
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Samples'))">
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" />
<!-- Add these here instead, so we can remove them for projects that don't have STJ available. -->
<Using Include="System.Text.Json" />
<Using Include="System.Text.Json.Serialization" />
</ItemGroup>
<!-- Set the version and local path for Sentry CLI (downloaded in the restore phase of Sentry.csproj) -->
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
<SentryCLIVersion>3.2.2</SentryCLIVersion>
<SentryCLIDirectory>$(MSBuildThisFileDirectory)tools\sentry-cli\$(SentryCLIVersion)\</SentryCLIDirectory>
</PropertyGroup>
<!-- dotnet-gcdump needs net6+ and won't work on mobile. -->
<PropertyGroup>
<PlatformIsLegacy Condition="$(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('netstandard'))">true</PlatformIsLegacy>
<PlatformIsMobile Condition="'$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst'">true</PlatformIsMobile>
<MemoryDumpSupported Condition="!($(PlatformIsLegacy) == 'true' or $(PlatformIsMobile) == 'true')">true</MemoryDumpSupported>
<DefineConstants Condition="'$(MemoryDumpSupported)' == 'true'">$(DefineConstants);MEMORY_DUMP_SUPPORTED</DefineConstants>
<!-- Workaround for this issue https://github.com/dotnet/sdk/issues/51265#issuecomment-3416621522 -->
<RestoreEnablePackagePruning Condition="'$(PlatformIsLegacy)' == 'true' "> false</RestoreEnablePackagePruning>
</PropertyGroup>
<!-- Public key of .assets/Sentry.snk - not a secret. Used by other InternalsVisibleTo entries throughout the solution. -->
<PropertyGroup>
<SentryPublicKey>002400000480000094000000060200000024000052534131000400000100010059964a931488bcdbd14657f1ee0df32df61b57b3d14d7290c262c2cc9ddaad6ec984044f761f778e1823049d2cb996a4f58c8ea5b46c37891414cb34b4036b1c178d7b582289d2eef3c0f1e9b692c229a306831ee3d371d9e883f0eb0f74aeac6c6ab8c85fd1ec04b267e15a31532c4b4e2191f5980459db4dce0081f1050fb8</SentryPublicKey>
</PropertyGroup>
<!-- Allow NSubstitute dynamic proxies to access any internal API. Its PublicKey is not a secret. -->
<ItemGroup>
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
</ItemGroup>
<!-- Definitions that we want available both for local developement and building transitively -->
<Import Project="$(MSBuildThisFileDirectory)\src\Sentry\buildTransitive\Sentry.props" />
</Project>