diff --git a/.gitignore b/.gitignore index 8ff53697f..bcaad9494 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ bld/ [Bb]in/ [Oo]bj/ BenchmarkDotNet.Artifacts/ +.dotnetcli/ # Visual Studio 2015 cache/options directory .vs/ diff --git a/.travis.yml b/.travis.yml index 562d018d5..e10883035 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,12 @@ matrix: dist: trusty sudo: required dotnet: 1.0.0-preview2-003121 - - os: osx # OSX 10.11 - osx_image: xcode7.2 - dotnet: 1.0.0-preview2-003121 + CLI_VERSION: 1.0.0 + # Disabled temporarily due to Travis OSX issues + # - os: osx # OSX 10.11 + # osx_image: xcode7.3 + # dotnet: 1.0.0-preview2-003121 + # CLI_VERSION: 1.0.0 script: - ./build.sh \ No newline at end of file diff --git a/Build.ps1 b/Build.ps1 index 55db40f54..648b06823 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -24,30 +24,30 @@ foreach ($src in ls src/*) { echo "build: Packaging project in $src" & dotnet build -c Release --version-suffix=$buildSuffix - & dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build + & dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build if($LASTEXITCODE -ne 0) { exit 1 } Pop-Location } -foreach ($test in ls test/*.PerformanceTests) { +foreach ($test in ls test/*.Tests) { Push-Location $test - echo "build: Building performance test project in $test" + echo "build: Testing project in $test" - & dotnet build -c Release - if($LASTEXITCODE -ne 0) { exit 2 } + & dotnet test -c Release + if($LASTEXITCODE -ne 0) { exit 3 } Pop-Location } -foreach ($test in ls test/*.Tests) { +foreach ($test in ls test/*.PerformanceTests) { Push-Location $test - echo "build: Testing project in $test" + echo "build: Building performance test project in $test" - & dotnet test -c Release - if($LASTEXITCODE -ne 0) { exit 3 } + & dotnet build -c Release + if($LASTEXITCODE -ne 0) { exit 2 } Pop-Location } diff --git a/Serilog.sln b/Serilog.sln index 32d2b0d9b..be7104f64 100644 --- a/Serilog.sln +++ b/Serilog.sln @@ -1,15 +1,11 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0D135C0C-A60B-454A-A2F4-CD74A30E04B0}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .travis.yml = .travis.yml appveyor.yml = appveyor.yml Build.ps1 = Build.ps1 build.sh = build.sh @@ -22,44 +18,84 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5 assets\Serilog.snk = assets\Serilog.snk EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog", "src\Serilog\Serilog.xproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{791D4267-0D6F-4FDF-80F2-11F4E793B0F2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog", "src\Serilog\Serilog.csproj", "{AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{290A2775-7CA0-4F81-9DDC-32E28C3A7565}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestDummies", "test\TestDummies\TestDummies.csproj", "{37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestDummies", "test\TestDummies\TestDummies.xproj", "{2BB12CE5-C867-43BD-AE5D-253FE3248C7F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{B11B911D-977A-42CE-900A-596CF59F6FFA}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.PerformanceTests", "test\Serilog.PerformanceTests\Serilog.PerformanceTests.xproj", "{D7A37F73-BBA3-4DAE-9648-1A753A86F968}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.PerformanceTests", "test\Serilog.PerformanceTests\Serilog.PerformanceTests.csproj", "{B4AC7ED9-517B-47E9-BB49-15F8A8478E62}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.Build.0 = Release|Any CPU - {3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.Build.0 = Release|Any CPU - {2BB12CE5-C867-43BD-AE5D-253FE3248C7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2BB12CE5-C867-43BD-AE5D-253FE3248C7F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2BB12CE5-C867-43BD-AE5D-253FE3248C7F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2BB12CE5-C867-43BD-AE5D-253FE3248C7F}.Release|Any CPU.Build.0 = Release|Any CPU - {D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Release|Any CPU.Build.0 = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|x64.Build.0 = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Debug|x86.Build.0 = Debug|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|Any CPU.Build.0 = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|x64.ActiveCfg = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|x64.Build.0 = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|x86.ActiveCfg = Release|Any CPU + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1}.Release|x86.Build.0 = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|x64.ActiveCfg = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|x64.Build.0 = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|x86.ActiveCfg = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Debug|x86.Build.0 = Debug|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|Any CPU.Build.0 = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|x64.ActiveCfg = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|x64.Build.0 = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|x86.ActiveCfg = Release|Any CPU + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF}.Release|x86.Build.0 = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|x64.ActiveCfg = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|x64.Build.0 = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|x86.ActiveCfg = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Debug|x86.Build.0 = Debug|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|Any CPU.Build.0 = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|x64.ActiveCfg = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|x64.Build.0 = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|x86.ActiveCfg = Release|Any CPU + {B11B911D-977A-42CE-900A-596CF59F6FFA}.Release|x86.Build.0 = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|x64.ActiveCfg = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|x64.Build.0 = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|x86.ActiveCfg = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Debug|x86.Build.0 = Debug|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|Any CPU.Build.0 = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|x64.ActiveCfg = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|x64.Build.0 = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|x86.ActiveCfg = Release|Any CPU + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {037440DE-440B-4129-9F7A-09B42D00397E} - {3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {2BB12CE5-C867-43BD-AE5D-253FE3248C7F} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {D7A37F73-BBA3-4DAE-9648-1A753A86F968} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} + {AB00B377-9F1E-4D4B-B6B0-B95F53BCAEF1} = {791D4267-0D6F-4FDF-80F2-11F4E793B0F2} + {37EF0B5E-0363-4A47-AF3E-51FA6E79E3CF} = {290A2775-7CA0-4F81-9DDC-32E28C3A7565} + {B11B911D-977A-42CE-900A-596CF59F6FFA} = {290A2775-7CA0-4F81-9DDC-32E28C3A7565} + {B4AC7ED9-517B-47E9-BB49-15F8A8478E62} = {290A2775-7CA0-4F81-9DDC-32E28C3A7565} EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml index 185375dde..6c3d55e65 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,18 +4,13 @@ image: Visual Studio 2015 configuration: Release install: - ps: mkdir -Force ".\build\" | Out-Null - - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" + - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli" - - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121' + - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0' - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" +test: off build_script: - ps: ./Build.ps1 -test_script: - - nuget.exe install OpenCover -ExcludeVersion - - OpenCover\tools\OpenCover.Console.exe -register:user -filter:"+[Serilog]*" -target:"dotnet.exe" "-targetargs:test test\Serilog.Tests" -returntargetcode -hideskipped:All -output:coverage.xml - - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" - - pip install codecov - - codecov -f "coverage.xml" artifacts: - path: artifacts/Serilog.*.nupkg deploy: diff --git a/build.cmd b/build.cmd new file mode 100644 index 000000000..29af91cd3 --- /dev/null +++ b/build.cmd @@ -0,0 +1 @@ +@powershell .\Build.ps1 %* \ No newline at end of file diff --git a/build.sh b/build.sh index ff84facad..100633557 100755 --- a/build.sh +++ b/build.sh @@ -1,17 +1,26 @@ #!/bin/bash +export DOTNET_INSTALL_DIR="$PWD/.dotnetcli" +DotnetCliVersion=${CLI_VERSION:="1.0.0"} +install_script_url=https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh +curl -sSL $install_script_url | bash /dev/stdin --version "$DotnetCliVersion" --install-dir "$DOTNET_INSTALL_DIR" +export PATH="$DOTNET_INSTALL_DIR:$PATH" + +# See issue https://github.com/NuGet/Home/issues/2163 +ulimit -n 2048 + +dotnet --info dotnet restore -for path in src/*/project.json; do - dirname="$(dirname "${path}")" - dotnet build ${dirname} -c Release + +for path in src/**/*.csproj; do + dotnet build -f netstandard1.0 -c Release ${path} + dotnet build -f netstandard1.3 -c Release ${path} done -for path in test/Serilog.Tests/project.json; do - dirname="$(dirname "${path}")" - dotnet build ${dirname} -f netcoreapp1.0 -c Release - dotnet test ${dirname} -f netcoreapp1.0 -c Release +for path in test/*.Tests/*.csproj; do + dotnet test -f netcoreapp1.0 -c Release ${path} done -for path in test/Serilog.PerformanceTests/project.json; do - dirname="$(dirname "${path}")" - dotnet build ${dirname} -f netcoreapp1.0 -c Release -done \ No newline at end of file +for path in test/*.PerformanceTests/*.PerformanceTests.csproj; do + dotnet build -f netcoreapp1.1 -c Release ${path} + # dotnet test -f netcoreapp1.1 -c Release ${path} +done diff --git a/global.json b/global.json index a2b2a4152..6cedd685d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "projects": [ "src", "test" ], "sdk": { - "version": "1.0.0-preview2-003121" + "version": "1.0.0" } } diff --git a/run_perf_tests.sh b/run_perf_tests.sh index 18403fd8e..c332aa20d 100755 --- a/run_perf_tests.sh +++ b/run_perf_tests.sh @@ -1,10 +1,6 @@ #!/bin/bash dotnet restore -for path in src/*/project.json; do - dirname="$(dirname "${path}")" - dotnet build ${dirname} -c Release -done -for path in test/Serilog.PerformanceTests/project.json; do - dirname="$(dirname "${path}")" - dotnet test ${dirname} -f netcoreapp1.0 -c Release -done \ No newline at end of file + +for path in test/*.PerformanceTests/*.csproj; do + dotnet test -f netcoreapp1.1 -c Release ${path} +done diff --git a/src/Serilog/Serilog.csproj b/src/Serilog/Serilog.csproj new file mode 100644 index 000000000..772e0ecef --- /dev/null +++ b/src/Serilog/Serilog.csproj @@ -0,0 +1,74 @@ + + + + Simple .NET logging with fully-structured events + 2.4.1 + Serilog Contributors + net45;net46;netstandard1.0;netstandard1.3 + true + Serilog + ../../assets/Serilog.snk + true + true + Serilog + serilog;logging;semantic;structured + http://serilog.net/images/serilog-nuget.png + http://serilog.net + http://www.apache.org/licenses/LICENSE-2.0 + false + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(DefineConstants);REMOTING;HASHTABLE + + + + $(DefineConstants);ASYNCLOCAL + + + + $(DefineConstants);ASYNCLOCAL;HASHTABLE + + + + + + + + + + + + + + + + + + diff --git a/src/Serilog/Serilog.xproj b/src/Serilog/Serilog.xproj deleted file mode 100644 index 865914c3d..000000000 --- a/src/Serilog/Serilog.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 803cd13a-d54b-4cec-a55f-e22ae3d93b3c - Serilog - .\obj - .\bin\ - - 2.0 - - - diff --git a/src/Serilog/project.json b/src/Serilog/project.json deleted file mode 100644 index 810666497..000000000 --- a/src/Serilog/project.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": "2.4.1-*", - - "description": "Simple .NET logging with fully-structured events", - "authors": [ "Serilog Contributors" ], - - "packOptions": { - "tags": [ "serilog", "logging", "semantic", "structured" ], - "projectUrl": "http://serilog.net", - "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0", - "iconUrl": "http://serilog.net/images/serilog-nuget.png" - }, - - "buildOptions": { - "keyFile": "../../assets/Serilog.snk", - "xmlDoc": true - }, - - "frameworks": { - "net4.5": { - "buildOptions": { - "define": [ "REMOTING", "HASHTABLE" ] - } - }, - "net4.6": { - "buildOptions": { - "define": [ "ASYNCLOCAL", "HASHTABLE" ] - } - }, - "netstandard1.0": { - "dependencies": { - "Microsoft.CSharp": "4.0.1", - "System.Collections": "4.0.11", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.0.11", - "System.Linq": "4.1.0", - "System.Reflection": "4.1.0", - "System.Reflection.Extensions": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.0.11" - } - }, - "netstandard1.3": { - "buildOptions": { - "define": [ "ASYNCLOCAL", "HASHTABLE" ] - }, - "dependencies": { - "Microsoft.CSharp": "4.0.1", - "System.Collections": "4.0.11", - "System.Collections.NonGeneric": "4.0.1", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.0.11", - "System.Linq": "4.1.0", - "System.Reflection": "4.1.0", - "System.Reflection.Extensions": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.0.11" - } - } - } -} diff --git a/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj b/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj new file mode 100644 index 000000000..9b54fe0d9 --- /dev/null +++ b/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj @@ -0,0 +1,32 @@ + + + netcoreapp1.1;net452 + Serilog.PerformanceTests + ../../assets/Serilog.snk + true + true + Serilog.PerformanceTests + true + + $(PackageTargetFallback);dnxcore50;portable-net45+win8 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Serilog.PerformanceTests/Serilog.PerformanceTests.xproj b/test/Serilog.PerformanceTests/Serilog.PerformanceTests.xproj deleted file mode 100644 index e84267546..000000000 --- a/test/Serilog.PerformanceTests/Serilog.PerformanceTests.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - d7a37f73-bba3-4dae-9648-1a753a86f968 - Serilog.PerformanceTests - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Serilog.PerformanceTests/project.json b/test/Serilog.PerformanceTests/project.json deleted file mode 100755 index 70bc3da6f..000000000 --- a/test/Serilog.PerformanceTests/project.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "testRunner": "xunit", - - "dependencies": { - "Serilog": { "target": "project" }, - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10025", - "BenchmarkDotNet": "0.9.9" - }, - "buildOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - }, - "System.Collections": "4.0.11" - }, - "imports": [ - "dnxcore50", - "portable-net45+win8" - ] - }, - "net4.5.2": { - } - } -} diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj new file mode 100644 index 000000000..dfa074061 --- /dev/null +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -0,0 +1,41 @@ + + + netcoreapp1.0;net452;net46 + Serilog.Tests + ../../assets/Serilog.snk + true + true + Serilog.Tests + true + $(PackageTargetFallback);dnxcore50;portable-net45+win8 + + + + + + + + + + + + + + + + + + + $(DefineConstants);APPDOMAIN;REMOTING;GETCURRENTMETHOD + + + $(DefineConstants);ASYNCLOCAL + + + + + + + + + \ No newline at end of file diff --git a/test/Serilog.Tests/Serilog.Tests.xproj b/test/Serilog.Tests/Serilog.Tests.xproj deleted file mode 100644 index f620d4de3..000000000 --- a/test/Serilog.Tests/Serilog.Tests.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 3c2d8e01-5580-426a-bdd9-ec59cd98e618 - Serilog.Tests - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs index 7b57984e8..ffb974378 100644 --- a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs +++ b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs @@ -24,7 +24,7 @@ public void FindsConfigurationAssemblies() // The core Serilog assembly is always considered Assert.Equal(1, configurationAssemblies.Count); - } + } [Fact] public void PropertyEnrichmentIsApplied() @@ -127,30 +127,33 @@ public void AuditSinksAreConfigured() } [Fact] - public void TestMinimumLevelOverrides() { + public void TestMinimumLevelOverrides() + { var settings = new Dictionary + { - ["minimum-level:override:Microsoft"] = "Warning", + ["minimum-level:override:System"] = "Warning", }; LogEvent evt = null; var log = new LoggerConfiguration() - .ReadFrom.KeyValuePairs(settings) - .WriteTo.Sink(new DelegatingSink(e => evt = e)) - .CreateLogger(); + .ReadFrom.KeyValuePairs(settings) + .WriteTo.Sink(new DelegatingSink(e => evt = e)) + .CreateLogger(); - var microsoftLogger = log.ForContext(); - microsoftLogger.Write(Some.InformationEvent()); + var systemLogger = log.ForContext(); + systemLogger.Write(Some.InformationEvent()); Assert.Null(evt); - microsoftLogger.Warning("Bad things"); + systemLogger.Warning("Bad things"); Assert.NotNull(evt); evt = null; log.Write(Some.InformationEvent()); Assert.NotNull(evt); } + } } diff --git a/test/Serilog.Tests/project.json b/test/Serilog.Tests/project.json deleted file mode 100644 index f148cd108..000000000 --- a/test/Serilog.Tests/project.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "testRunner": "xunit", - - "dependencies": { - "Serilog": { "target": "project" }, - "TestDummies": { "target": "project" }, - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10025" - }, - - "buildOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - "frameworks": { - "netcoreapp1.0": { - "define": [ "ASYNCLOCAL" ], - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - } - }, - "imports": [ - "dnxcore50", - "portable-net45+win8" - ] - }, - "net4.5.2": { - "buildOptions": { - "define": [ "APPDOMAIN", "REMOTING", "GETCURRENTMETHOD" ] - } - }, - "net4.6": { - "buildOptions": { - "define": [ "ASYNCLOCAL", "APPDOMAIN", "GETCURRENTMETHOD" ] - } - } - } -} diff --git a/test/TestDummies/TestDummies.csproj b/test/TestDummies/TestDummies.csproj new file mode 100644 index 000000000..5f8ab00dc --- /dev/null +++ b/test/TestDummies/TestDummies.csproj @@ -0,0 +1,24 @@ + + + + net452;netstandard1.3 + TestDummies + ../../assets/Serilog.snk + true + true + TestDummies + false + false + false + + + + + + + + + + + + diff --git a/test/TestDummies/TestDummies.xproj b/test/TestDummies/TestDummies.xproj deleted file mode 100644 index 491d7aa12..000000000 --- a/test/TestDummies/TestDummies.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - 2bb12ce5-c867-43bd-ae5d-253fe3248c7f - TestDummies - .\obj - .\bin\ - v4.5.2 - - - - 2.0 - - - diff --git a/test/TestDummies/project.json b/test/TestDummies/project.json deleted file mode 100644 index 6d498ef45..000000000 --- a/test/TestDummies/project.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "buildOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - - "dependencies": { - "NETStandard.Library": "1.6.0", - "Serilog": { "target": "project" } - }, - - "frameworks": { - "net4.5.2": { }, - "netstandard1.3": {} - } -}