diff --git a/Build.ps1 b/Build.ps1 index d4ffa57cc3..a1bf289bb8 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,4 +1,4 @@ -# Taken from psake https://github.com/psake/psake +# Taken from psake https://github.com/psake/psake <# .SYNOPSIS @@ -35,7 +35,7 @@ else { $solution = "./AutoMapper.slnx" } -exec { & dotnet test $solution --configuration Release --results-directory $artifacts --logger trx } +exec { & dotnet test $solution --configuration Release --results-directory $artifacts --logger trx -- RunConfiguration.TreatNoTestsAsError=true } # Only pack AutoMapper project on Windows runners in GitHub Actions if ($env:GITHUB_ACTIONS -eq 'true' -and $env:RUNNER_OS -eq 'Windows') { diff --git a/Directory.Packages.props b/Directory.Packages.props index 346b7a5398..1ce9eaae06 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -30,8 +30,8 @@ - - + + diff --git a/src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj b/src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj index 48503b7a31..e97431822c 100644 --- a/src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj +++ b/src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj @@ -2,6 +2,7 @@ net10.0;net11.0 + Exe true AutoMapper.Extensions.Microsoft.DependencyInjection.Tests AutoMapper.Extensions.Microsoft.DependencyInjection.Tests @@ -20,7 +21,7 @@ - + diff --git a/src/IntegrationTests/AutoMapper.IntegrationTests.csproj b/src/IntegrationTests/AutoMapper.IntegrationTests.csproj index 1ff1f06c94..b38d1702d1 100644 --- a/src/IntegrationTests/AutoMapper.IntegrationTests.csproj +++ b/src/IntegrationTests/AutoMapper.IntegrationTests.csproj @@ -2,6 +2,7 @@ net10.0;net11.0 + Exe $(NoWarn);618 ..\..\AutoMapper.snk true @@ -11,7 +12,7 @@ - + diff --git a/src/UnitTests/App.config b/src/UnitTests/App.config index 9b07a3cb9f..2cf3c695a8 100644 --- a/src/UnitTests/App.config +++ b/src/UnitTests/App.config @@ -1,15 +1,4 @@ - - - - - - - - - - - - - - - + + + + diff --git a/src/UnitTests/AutoMapper.UnitTests.csproj b/src/UnitTests/AutoMapper.UnitTests.csproj index 7bd1d68e2f..a5be816959 100644 --- a/src/UnitTests/AutoMapper.UnitTests.csproj +++ b/src/UnitTests/AutoMapper.UnitTests.csproj @@ -2,6 +2,7 @@ net10.0;net11.0 + Exe $(NoWarn);649;618 ..\..\AutoMapper.snk true @@ -9,14 +10,14 @@ true - $(TargetFrameworks);net471 + $(TargetFrameworks);net472 - + diff --git a/src/UnitTests/Licensing/LicenseAccessorTests.cs b/src/UnitTests/Licensing/LicenseAccessorTests.cs index e10c03e02a..f05083203c 100644 --- a/src/UnitTests/Licensing/LicenseAccessorTests.cs +++ b/src/UnitTests/Licensing/LicenseAccessorTests.cs @@ -53,9 +53,6 @@ public void NonBase64UrlCharacters_LogIncompleteMessage() ShouldLogIncompleteKey(logs, key); } -#if !NETFRAMEWORK - // On .NET Framework the test host doesn't apply the generated binding redirects, so signature - // validation fails to load System.Threading.Tasks.Extensions before it reaches the signature check. [Fact] public void InvalidSignature_LogsCopyPasteHint_WithoutExceptionDetails() { @@ -64,7 +61,6 @@ public void InvalidSignature_LogsCopyPasteHint_WithoutExceptionDetails() ShouldLogPlainCritical(logs, "copy the full key again"); ShouldLogDetailsAtDebug(logs); } -#endif [Fact] public void UnparseableToken_LogsIncompleteMessage_WithoutExceptionDetails()