Skip to content

Commit

Permalink
Bump to Visual Studio 2022 on AppVeyor (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored Dec 2, 2021
1 parent 5b14701 commit bb81429
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
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
}
}

0 comments on commit bb81429

Please sign in to comment.