Skip to content

Commit 16999cc

Browse files
committed
Not sure why Microsoft.Extensions.DependencyInjection isn't picked up.
1 parent 129caf9 commit 16999cc

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<Description>Serilog provider for Microsoft.Extensions.Logging</Description>
45
<VersionPrefix>1.4.1</VersionPrefix>
@@ -19,39 +20,48 @@
1920
<!-- Don't reference the full NETStandard.Library -->
2021
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
2122
</PropertyGroup>
23+
2224
<ItemGroup>
2325
<PackageReference Include="Serilog" Version="2.3.0" />
2426
</ItemGroup>
27+
2528
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
2629
<Reference Include="System.Runtime" />
2730
<Reference Include="System" />
2831
<Reference Include="Microsoft.CSharp" />
2932
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.0" />
3033
</ItemGroup>
34+
3135
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
3236
<Reference Include="System.Runtime" />
3337
<Reference Include="System" />
3438
<Reference Include="Microsoft.CSharp" />
3539
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.0" />
3640
</ItemGroup>
41+
3742
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
3843
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.0" />
3944
<Compile Remove="SerilogLoggerServicesExtensions.cs" />
4045
</ItemGroup>
46+
4147
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
4248
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0-preview2-final" />
4349
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0-preview2-final" />
4450
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0-preview2-final" />
4551
<PackageReference Include="NETStandard.Library" Version="2.0.0-preview2-25401-01" />
4652
<Compile Remove="SerilogLoggerFactoryExtensions.cs" />
4753
</ItemGroup>
54+
4855
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
4956
<DefineConstants>$(DefineConstants);ASYNCLOCAL</DefineConstants>
5057
</PropertyGroup>
58+
5159
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
5260
<DefineConstants>$(DefineConstants);ASYNCLOCAL</DefineConstants>
5361
</PropertyGroup>
62+
5463
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
5564
<DefineConstants>$(DefineConstants);ASYNCLOCAL</DefineConstants>
5665
</PropertyGroup>
66+
5767
</Project>

src/Serilog.Extensions.Logging/SerilogLoggerServicesExtensions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
using System;
2-
using Microsoft.Extensions.Logging;
3-
using Serilog.Extensions.Logging;
42
using System.ComponentModel;
53
using Microsoft.Extensions.DependencyInjection;
4+
using Microsoft.Extensions.Logging;
5+
using Serilog.Extensions.Logging;
6+
67

78
namespace Serilog
89
{
910
/// <summary>
1011
/// Extends <see cref="IServiceCollection"/> with Serilog configuration methods.
1112
/// </summary>
1213
public static class SerilogLoggerServicesExtensions
13-
{
14+
{
1415
/// <summary>
1516
/// Add Serilog to the logging pipeline.
1617
/// </summary>
@@ -43,4 +44,4 @@ public static IServiceCollection AddSerilog(this IServiceCollection services, Se
4344
return services;
4445
}
4546
}
46-
}
47+
}

0 commit comments

Comments
 (0)