Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

add .netstandard2.0 target #222

Merged
merged 2 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<VersionPrefix>6.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Serilog Contributors</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net45;netstandard1.3;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Serilog.Formatting.Elasticsearch</AssemblyName>
Expand Down Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);NO_SERIALIZATION</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
24 changes: 12 additions & 12 deletions src/Serilog.Sinks.Elasticsearch/Serilog.Sinks.Elasticsearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<VersionPrefix>6.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Serilog Contributors</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net45;netstandard1.3;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Serilog.Sinks.Elasticsearch</AssemblyName>
Expand Down Expand Up @@ -45,19 +45,19 @@
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DURABLE;THREADING_TIMER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DURABLE;THREADING_TIMER</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DURABLE;THREADING_TIMER;HRESULTS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DURABLE;THREADING_TIMER</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION;NO_TIMER</DefineConstants>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<NoWarn>1591;1701;1702</NoWarn>
<DefineConstants>$(DefineConstants);DURABLE;THREADING_TIMER;HRESULTS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net45|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ public void ThrowAndLogAndCatchBulkOutput(string exceptionMessage)
.And.Be(exceptionMessage);
var realException = firstEvent.Exceptions[0];
#if !NO_SERIALIZATION
#if !PARTIALLY_SERIALIZATION
realException.ExceptionMethod.Should().NotBeNull();
realException.ExceptionMethod.Name.Should().NotBeNullOrWhiteSpace();
realException.ExceptionMethod.AssemblyName.Should().NotBeNullOrWhiteSpace();
realException.ExceptionMethod.AssemblyVersion.Should().NotBeNullOrWhiteSpace();
realException.ExceptionMethod.ClassName.Should().NotBeNullOrWhiteSpace();
realException.ExceptionMethod.Signature.Should().NotBeNullOrWhiteSpace();
realException.ExceptionMethod.MemberType.Should().BeGreaterThan(0);

#endif
var nastyException = firstEvent.Exceptions[1];
nastyException.Depth.Should().Be(1);
nastyException.Message.Should().Be("nasty inner exception");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;netcoreapp2.0;net451</TargetFrameworks>
<AssemblyName>Serilog.Sinks.Elasticsearch.Tests</AssemblyName>
<PackageId>Serilog.Sinks.Elasticsearch.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down Expand Up @@ -64,7 +64,11 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION;NO_TIMER</DefineConstants>
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<DefineConstants>$(DefineConstants);DOTNETCORE;PARTIALLY_SERIALIZATION</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down