Skip to content

Commit

Permalink
Merge pull request #2 from getsentry/feat/multi-target
Browse files Browse the repository at this point in the history
Multi target: ns2.0, ns1.3, net46
  • Loading branch information
bruno-garcia authored Jul 27, 2018
2 parents 1f9c4ab + 98e47bc commit 7890e44
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>

<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry.Protocol/Dsn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private Dsn(string dsn, string projectId, string path, string secretKey, string
/// <c>true</c> if the string represents a disabled DSN; otherwise, <c>false</c>.
/// </returns>
public static bool IsDisabled(string dsn) =>
Constants.DisableSdkDsnValue.Equals(dsn, StringComparison.InvariantCultureIgnoreCase);
Constants.DisableSdkDsnValue.Equals(dsn, StringComparison.OrdinalIgnoreCase);

/// <summary>
/// Tries to parse the string into a <see cref="Dsn"/>
Expand Down
13 changes: 12 additions & 1 deletion src/Sentry.Protocol/Sentry.Protocol.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;netstandard1.3;net46</TargetFrameworks>
<LangVersion>7.2</LangVersion>
<PackageId>Sentry.Protocol</PackageId>
<AssemblyName>Sentry.Protocol</AssemblyName>
<RootNamespace>Sentry.Protocol</RootNamespace>
<Description>The Sentry Protocol used to communicate with Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

</Project>
16 changes: 13 additions & 3 deletions test/Sentry.Protocol.Tests/Sentry.Protocol.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;net462</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../src/Sentry.Protocol/Sentry.Protocol.csproj" />
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Threading.Tasks" />
<ProjectReference Include="../../src/Sentry.Protocol/Sentry.Protocol.csproj" Properties="TargetFramework=net46" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<ProjectReference Include="../../src/Sentry.Protocol/Sentry.Protocol.csproj" Properties="TargetFramework=netstandard1.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<ProjectReference Include="../../src/Sentry.Protocol/Sentry.Protocol.csproj" Properties="TargetFramework=netstandard2.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 7890e44

Please sign in to comment.