-
Notifications
You must be signed in to change notification settings - Fork 44
/
Rollbar.csproj
97 lines (83 loc) · 4.4 KB
/
Rollbar.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
<Project ToolsVersion="Current">
<PropertyGroup>
<!-- REFERENCE: https://docs.microsoft.com/en-us/dotnet/standard/frameworks -->
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;net48;net472;net471;net47;net462;net461;net46;net452;netstandard2.0</TargetFrameworks>
<!--TargetFrameworks>netcoreapp2.2;netcoreapp2.1;netcoreapp2.0;net48;net472;net471;net47;net462;net461</TargetFrameworks-->
<AssemblyName>Rollbar</AssemblyName>
<RootNamespace>Rollbar</RootNamespace>
<Configurations>Debug;Release;Instrumented</Configurations>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<Import Project="..\SdkCommon.csproj" />
<PropertyGroup Label="Any build">
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Label="Instrumented build" Condition="'$(Configuration)'=='Instrumented' And '$(Platform)' == 'AnyCPU'">
<DefineConstants>$(DefineConstants);INSTRUMENT</DefineConstants>
</PropertyGroup>
<!--TargetFramework dependent settings-->
<Choose>
<!--.Net Standard-->
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PropertyGroup Label=".NetStandard build">
<NetVariant>NET_STANDARD</NetVariant>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
</When>
<When Condition="$(TargetFramework.StartsWith('netstandard'))">
<PropertyGroup Label=".NetStandard build">
<NetVariant>NET_STANDARD</NetVariant>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
</When>
<!--.Net Core-->
<When Condition="$(TargetFramework.StartsWith('netcoreapp')) Or '$(TargetFramework)' == 'net5.0'">
<PropertyGroup Label=".NetCore build">
<NetVariant>NET_CORE</NetVariant>
<DefineConstants>$(DefineConstants);NETCOREAPP</DefineConstants>
</PropertyGroup>
</When>
<!--.NET Framework-->
<When Condition="$(TargetFramework.StartsWith('net4'))">
<PropertyGroup Label=".NET Framework build">
<NetVariant>NET_FX</NetVariant>
<DefineConstants>$(DefineConstants);NETFX</DefineConstants>
</PropertyGroup>
<ItemGroup Label=".NET Framework build">
<Reference Include="System.Configuration" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
<Reference Include="System.ServiceModel" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net47' Or $(TargetFramework.StartsWith('net46')) Or $(TargetFramework.StartsWith('net45'))">
<DefineConstants>$(DefineConstants);NETFX_47nOlder</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net48')) Or $(TargetFramework.StartsWith('net47')) Or ($(TargetFramework.StartsWith('net46')) And ('$(TargetFramework)' != 'net46'))">
<DefineConstants>$(DefineConstants);NETFX_461nNewer</DefineConstants>
</PropertyGroup>
</When>
<Otherwise>
<!--NOTHING-->
</Otherwise>
</Choose>
<!--EF Core specific settings dependent on TargetFramework (to keep Rollbar.OfflinePersistence's dependencies happy)-->
<Choose>
<When Condition="'$(TargetFramework)' == 'net46' Or $(TargetFramework.StartsWith('net45'))">
<ItemGroup Label="EF Core for Legacy NetStandard 2.0 non-copmliant framework targets.">
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup Label="EF Core for NetStandard 2.0 copmliant framework targets." Condition="!('$(TargetFramework)' == 'net46' Or '$(TargetFramework)' == 'net452')">
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</Otherwise>
</Choose>
<Target Condition="!($(TargetFramework.StartsWith('netcoreapp')) Or $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('net45')) Or '$(TargetFramework)' == 'net46')" Name="IncludeNativeBinariesAsOutput" BeforeTargets="GetCopyToOutputDirectoryItems">
<AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
</AssignTargetPath>
</Target>
<!-- REFERENCE: https://docs.microsoft.com/en-us/visualstudio/msbuild/otherwise-element-msbuild?view=vs-2019 -->
</Project>