diff --git a/appveyor.yml b/appveyor.yml index f2986775..e57d091c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: 5.0.0-{build} # Only change for mayor versions (e.g. 6.0) -image: Visual Studio 2019 +image: Visual Studio 2022 configuration: Release skip_tags: true @@ -21,8 +21,7 @@ artifacts: test_script: - nuget.exe install OpenCover -ExcludeVersion -DependencyVersion Ignore - - OpenCover\tools\OpenCover.Console.exe -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f netcoreapp1.1 -c debug NLog.Extensions.Logging.Tests" -filter:"+[NLog.Extensions.Logging]* +[NLog.Extensions.Hosting]* -[NLog.Extensions.Logging.Tests]* -[NLog.Extensions.Hosting.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" - - OpenCover\tools\OpenCover.Console.exe -register:user -mergeoutput -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f netcoreapp2.1 -c debug NLog.Extensions.Logging.Tests" -filter:"+[NLog.Extensions.Logging]* -[NLog.Extensions.Logging.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" + - OpenCover\tools\OpenCover.Console.exe -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f netcoreapp2.1 -c debug NLog.Extensions.Logging.Tests" -filter:"+[NLog.Extensions.Logging]* +[NLog.Extensions.Hosting]* -[NLog.Extensions.Logging.Tests]* -[NLog.Extensions.Hosting.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" - OpenCover\tools\OpenCover.Console.exe -register:user -mergeoutput -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f netcoreapp3.1 -c debug NLog.Extensions.Logging.Tests" -filter:"+[NLog.Extensions.Logging]* -[NLog.Extensions.Logging.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" - OpenCover\tools\OpenCover.Console.exe -register:user -mergeoutput -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f net5.0 -c debug NLog.Extensions.Logging.Tests" -filter:"+[NLog.Extensions.Logging]* -[NLog.Extensions.Logging.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" - OpenCover\tools\OpenCover.Console.exe -register:user -mergeoutput -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -f netcoreapp2.1 -c debug NLog.Extensions.Hosting.Tests" -filter:"+[NLog.Extensions.Logging]* +[NLog.Extensions.Hosting]* -[NLog.Extensions.Logging.Tests]* -[NLog.Extensions.Hosting.Tests]*" -output:"coverage.xml" -oldstyle -targetdir:"test" diff --git a/test/NLog.Extensions.Logging.Tests/ConfigSettingLayoutRendererTests.cs b/test/NLog.Extensions.Logging.Tests/ConfigSettingLayoutRendererTests.cs index 0814b955..a0be3701 100644 --- a/test/NLog.Extensions.Logging.Tests/ConfigSettingLayoutRendererTests.cs +++ b/test/NLog.Extensions.Logging.Tests/ConfigSettingLayoutRendererTests.cs @@ -15,7 +15,6 @@ public void ConfigSettingFallbackDefaultLookup() Assert.Equal("MyTableName", result); } -#if !NETCORE1_0 [Fact] public void ConfigSettingGlobalConfigLookup() { @@ -26,6 +25,5 @@ public void ConfigSettingGlobalConfigLookup() var result = layoutRenderer.Render(LogEventInfo.CreateNullEvent()); Assert.Equal("Test", result); } -#endif } } diff --git a/test/NLog.Extensions.Logging.Tests/Extensions/ConfigureExtensionsTests.cs b/test/NLog.Extensions.Logging.Tests/Extensions/ConfigureExtensionsTests.cs index f932ce7a..f007425c 100644 --- a/test/NLog.Extensions.Logging.Tests/Extensions/ConfigureExtensionsTests.cs +++ b/test/NLog.Extensions.Logging.Tests/Extensions/ConfigureExtensionsTests.cs @@ -77,7 +77,6 @@ public void AddNLog_LoggerFactory_IncludeActivityIdsWithBeginScope() } #endif -#if !NETCORE1_0 [Fact] public void AddNLog_LoggingBuilder_LogInfo_ShouldLogToNLog() { @@ -166,7 +165,6 @@ internal class LoggingBuilderStub : ILoggingBuilder { public IServiceCollection Services { get; set; } = new ServiceCollection(); } -#endif private static void AssertSingleMessage(MemoryTarget memoryTarget, string expectedMessage) { diff --git a/test/NLog.Extensions.Logging.Tests/NLog.Extensions.Logging.Tests.csproj b/test/NLog.Extensions.Logging.Tests/NLog.Extensions.Logging.Tests.csproj index 02dc628f..43ab3d7f 100644 --- a/test/NLog.Extensions.Logging.Tests/NLog.Extensions.Logging.Tests.csproj +++ b/test/NLog.Extensions.Logging.Tests/NLog.Extensions.Logging.Tests.csproj @@ -3,7 +3,7 @@ PackageReference - netcoreapp1.1;netcoreapp2.1;netcoreapp3.1;net461;net5.0 + netcoreapp2.1;netcoreapp3.1;net461;net5.0 Library false Full @@ -16,10 +16,6 @@ true - - $(DefineConstants);NETCORE1_0 - - diff --git a/test/NLog.Extensions.Logging.Tests/NLogLoggingConfigurationTests.cs b/test/NLog.Extensions.Logging.Tests/NLogLoggingConfigurationTests.cs index a8e85084..d5eb1ed4 100644 --- a/test/NLog.Extensions.Logging.Tests/NLogLoggingConfigurationTests.cs +++ b/test/NLog.Extensions.Logging.Tests/NLogLoggingConfigurationTests.cs @@ -13,7 +13,6 @@ public class NLogLoggingConfigurationTests const string DefaultSectionName = "NLog"; const string CustomSectionName = "MyCustomSection"; -#if !NETCORE1_0 [Fact] public void LoadSimpleConfig() { @@ -303,6 +302,5 @@ private static Dictionary CreateMemoryConfigConsoleTargetAndRule return memoryConfig; } -#endif } }