File tree Expand file tree Collapse file tree 7 files changed +36
-34
lines changed
src/Serilog.Settings.Configuration Expand file tree Collapse file tree 7 files changed +36
-34
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ foreach ($src in dir src/*) {
20
20
21
21
echo " build: Packaging project in $src "
22
22
23
- & dotnet pack - c Release - o ..\..\artifacts -- version- suffix= $suffix
23
+ & dotnet pack - c Release - o ..\..\artifacts -- version- suffix= $suffix - p:ContinuousIntegrationBuild = true
24
24
if ($LASTEXITCODE -ne 0 ) { exit 1 }
25
25
26
26
Pop-Location
@@ -42,10 +42,25 @@ foreach ($test in dir test/*.Tests) {
42
42
43
43
echo " build: Testing project in $test "
44
44
45
- & dotnet test - c Release
45
+ if ($PSVersionTable.Platform -eq " Unix" ) {
46
+ & dotnet test - c Release -f netcoreapp2.0
47
+ & dotnet test - c Release -f netcoreapp3.1
48
+ } else {
49
+ & dotnet test - c Release
50
+ }
51
+
46
52
if ($LASTEXITCODE -ne 0 ) { exit 3 }
47
53
48
54
Pop-Location
49
55
}
50
56
57
+ if ($PSVersionTable.Platform -eq " Unix" ) {
58
+ Push-Location sample/ Sample
59
+
60
+ & dotnet run -f netcoreapp2.0 - c Release -- run- once
61
+ if ($LASTEXITCODE -ne 0 ) { exit 4 }
62
+
63
+ Pop-Location
64
+ }
65
+
51
66
Pop-Location
Original file line number Diff line number Diff line change 1
1
version : ' {build}'
2
2
skip_tags : true
3
- image : Visual Studio 2019
3
+ image :
4
+ - Visual Studio 2019
5
+ - Ubuntu1604
4
6
configuration : Release
5
7
build_script :
6
8
- ps : ./Build.ps1
9
+ for :
10
+ -
11
+ matrix :
12
+ only :
13
+ - image : Ubuntu1604
14
+ build_script :
15
+ - pwsh ./Build.ps1
7
16
test : off
8
17
artifacts :
9
18
- path : artifacts/Serilog.*.nupkg
@@ -12,7 +21,6 @@ deploy:
12
21
- provider : NuGet
13
22
api_key :
14
23
secure : b7jxRe5kR3kuxMrmdDuN0jvaaWWHwtFRnAwFZZV6MdaorwUhASR/Ey1gPn6vXwND
15
- skip_symbols : true
16
24
on :
17
25
branch : /^(master|dev)$/
18
26
- provider : GitHub
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 15
15
<PackageId >Serilog.Settings.Configuration</PackageId >
16
16
<PackageTags >serilog;json</PackageTags >
17
17
<PackageIcon >icon.png</PackageIcon >
18
- <PackageProjectUrl >https://serilog.net /</PackageProjectUrl >
18
+ <PackageProjectUrl >https://github.com/serilog/serilog-settings-configuration /</PackageProjectUrl >
19
19
<PackageLicenseExpression >Apache-2.0</PackageLicenseExpression >
20
20
<RootNamespace >Serilog</RootNamespace >
21
21
<PublishRepositoryUrl >true</PublishRepositoryUrl >
Original file line number Diff line number Diff line change @@ -18,11 +18,17 @@ public DependencyContextAssemblyFinder(DependencyContext dependencyContext)
18
18
public override IReadOnlyList < AssemblyName > FindAssembliesContainingName ( string nameToFind )
19
19
{
20
20
var query = from library in _dependencyContext . RuntimeLibraries
21
+ where IsReferencingSerilog ( library )
21
22
from assemblyName in library . GetDefaultAssemblyNames ( _dependencyContext )
22
23
where IsCaseInsensitiveMatch ( assemblyName . Name , nameToFind )
23
24
select assemblyName ;
24
25
25
26
return query . ToList ( ) . AsReadOnly ( ) ;
27
+
28
+ static bool IsReferencingSerilog ( Library library )
29
+ {
30
+ return library . Dependencies . Any ( dependency => dependency . Name . Equals ( "serilog" , StringComparison . OrdinalIgnoreCase ) ) ;
31
+ }
26
32
}
27
33
}
28
34
}
Original file line number Diff line number Diff line change @@ -264,7 +264,8 @@ internal static IConfigurationArgumentValue GetArgumentValue(IConfigurationSecti
264
264
265
265
static IReadOnlyCollection < Assembly > LoadConfigurationAssemblies ( IConfigurationSection section , AssemblyFinder assemblyFinder )
266
266
{
267
- var assemblies = new Dictionary < string , Assembly > ( ) ;
267
+ var serilogAssembly = typeof ( ILogger ) . Assembly ;
268
+ var assemblies = new Dictionary < string , Assembly > { [ serilogAssembly . FullName ] = serilogAssembly } ;
268
269
269
270
var usingSection = section . GetSection ( "Using" ) ;
270
271
if ( usingSection . GetChildren ( ) . Any ( ) )
You can’t perform that action at this time.
0 commit comments