Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Elasticsearch.Net 7.0.0. This depends on net-standard2.0 #96

Merged
merged 2 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/NLog.Targets.ElasticSearch.Tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
<logger name="*" minlevel="Info" writeTo="elastic"/>
</rules>
</nlog>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 3 additions & 9 deletions src/NLog.Targets.ElasticSearch/NLog.Targets.ElasticSearch.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
ultimaustin marked this conversation as resolved.
Show resolved Hide resolved
<Description>An NLog target that utilises the elasticsearch low level client.</Description>
<PackageLicenseUrl>https://raw.githubusercontent.com/ReactiveMarkets/NLog.Targets.ElasticSearch/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/ReactiveMarkets/NLog.Targets.ElasticSearch</PackageProjectUrl>
Expand All @@ -15,22 +15,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Elasticsearch.Net" Version="7.0.0-alpha2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="NLog" Version="4.5.11" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="Elasticsearch.Net" Version="6.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
ultimaustin marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="Elasticsearch.Net" Version="6.4.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<PackageReference Include="Elasticsearch.Net" Version="6.1.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/NLog.Targets.ElasticSearch/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Dynamic;
using System.Globalization;
using Newtonsoft.Json;
#if NET45
#if NET472
markmcdowell marked this conversation as resolved.
Show resolved Hide resolved
using System.Configuration;
#else
using Microsoft.Extensions.Configuration;
Expand Down Expand Up @@ -49,7 +49,7 @@ public static string GetConnectionString(this string name)
if (!string.IsNullOrEmpty(value))
return value;

#if NET45
#if NET472
var connectionString = ConfigurationManager.ConnectionStrings[name];
return connectionString?.ConnectionString;
#else
Expand Down