Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Visual Studio 2022 on AppVeyor + Removed .NET core 1 tests #558

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public void ConfigSettingFallbackDefaultLookup()
Assert.Equal("MyTableName", result);
}

#if !NETCORE1_0
[Fact]
public void ConfigSettingGlobalConfigLookup()
{
Expand All @@ -26,6 +25,5 @@ public void ConfigSettingGlobalConfigLookup()
var result = layoutRenderer.Render(LogEventInfo.CreateNullEvent());
Assert.Equal("Test", result);
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void AddNLog_LoggerFactory_IncludeActivityIdsWithBeginScope()
}
#endif

#if !NETCORE1_0
[Fact]
public void AddNLog_LoggingBuilder_LogInfo_ShouldLogToNLog()
{
Expand Down Expand Up @@ -166,7 +165,6 @@ internal class LoggingBuilderStub : ILoggingBuilder
{
public IServiceCollection Services { get; set; } = new ServiceCollection();
}
#endif

private static void AssertSingleMessage(MemoryTarget memoryTarget, string expectedMessage)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>

<TargetFrameworks>netcoreapp1.1;netcoreapp2.1;netcoreapp3.1;net461;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net461;net5.0</TargetFrameworks>
<OutputType>Library</OutputType>
<IsPackable>false</IsPackable>
<DebugType>Full</DebugType>
Expand All @@ -16,10 +16,6 @@
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);NETCORE1_0</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class NLogLoggingConfigurationTests
const string DefaultSectionName = "NLog";
const string CustomSectionName = "MyCustomSection";

#if !NETCORE1_0
[Fact]
public void LoadSimpleConfig()
{
Expand Down Expand Up @@ -303,6 +302,5 @@ private static Dictionary<string, string> CreateMemoryConfigConsoleTargetAndRule

return memoryConfig;
}
#endif
}
}