Skip to content

Commit f396e87

Browse files
authored
Merge pull request #96 from MV10/netstandard2_0
MS Config and DependencyModel refs updated
2 parents 26b2c7b + 9489ad4 commit f396e87

File tree

5 files changed

+37
-15
lines changed

5 files changed

+37
-15
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dotnet --info
55
dotnet restore
66

77
for path in src/**/*.csproj; do
8-
dotnet build -f netstandard1.6 -c Release ${path}
8+
dotnet build -f netstandard2.0 -c Release ${path}
99
done
1010

1111
for path in test/*.Tests/*.csproj; do

sample/Sample/Sample.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@
1313
<ProjectReference Include="..\..\src\Serilog.Settings.Configuration\Serilog.Settings.Configuration.csproj" />
1414
</ItemGroup>
1515

16-
<ItemGroup>
16+
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
1717
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
18+
</ItemGroup>
19+
20+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
21+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.1" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
1825
<PackageReference Include="Serilog.Sinks.Async" Version="1.0.1" />
1926
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
2027
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.0.0" />

src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.</Description>
55
<VersionPrefix>3.0.0</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
7-
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
7+
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>Serilog.Settings.Configuration</AssemblyName>
@@ -16,20 +16,20 @@
1616
<PackageIconUrl>https://serilog.net/images/serilog-configuration-nuget.png</PackageIconUrl>
1717
<PackageProjectUrl>https://github.com/serilog/serilog-settings-configuration</PackageProjectUrl>
1818
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
19-
20-
<!-- Don't reference the full NETStandard.Library -->
21-
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
2219
<RootNamespace>Serilog</RootNamespace>
2320
</PropertyGroup>
2421

2522
<ItemGroup>
26-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="1.0.0" />
27-
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.0.0" />
23+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.0.4" />
2824
<PackageReference Include="Serilog" Version="2.6.0" />
2925
</ItemGroup>
3026

31-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
32-
<DefineConstants>$(DefineConstants);APPDOMAIN</DefineConstants>
33-
</PropertyGroup>
27+
<ItemGroup Condition="'$(TargetFramework)' == 'net451'">
28+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="1.1.2" />
29+
</ItemGroup>
30+
31+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
32+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.0.1" />
33+
</ItemGroup>
3434

3535
</Project>

src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,10 @@ where filter(assemblyName.Name)
286286
}
287287
else
288288
{
289-
#if APPDOMAIN
290289
query = from outputAssemblyPath in System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.dll")
291290
let assemblyFileName = System.IO.Path.GetFileNameWithoutExtension(outputAssemblyPath)
292291
where filter(assemblyFileName)
293292
select AssemblyName.GetAssemblyName(outputAssemblyPath);
294-
#endif
295293
}
296294

297295
return query.ToArray();

test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<!--
4+
Because this is a multi-targeted project/solution, run tests from the command line
5+
with the current working directory set to the location of this csproj. Tests will not
6+
execute within the VS IDE as of version 15.6.5 (April 2018).
7+
8+
dotnet test [dash dash]framework net452
9+
dotnet test [dash dash]framework netcoreapp2.0
10+
11+
(XML doesn't allow double-dashes in comments...)
12+
-->
13+
314
<PropertyGroup>
415
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
516
<AssemblyName>Serilog.Settings.Configuration.Tests</AssemblyName>
@@ -13,12 +24,18 @@
1324
<ProjectReference Include="..\TestDummies\TestDummies.csproj" />
1425
</ItemGroup>
1526

27+
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
28+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
29+
</ItemGroup>
30+
31+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
32+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.1" />
33+
</ItemGroup>
34+
1635
<ItemGroup>
1736
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
1837
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
1938
<PackageReference Include="xunit" Version="2.2.0" />
20-
21-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.0" />
2239
</ItemGroup>
2340

2441
<ItemGroup>

0 commit comments

Comments
 (0)