diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index cf06e56..d3e3194 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -122,9 +122,9 @@ jobs:
name: build
# Run all tests
- - run: dotnet test --no-restore --no-build -c Release
+ - run: dotnet test --no-restore --no-build -c Release -- xUnit.AppDomain=denied
if: matrix.os == 'ubuntu-latest'
- - run: dotnet test --no-restore --no-build -c Release --filter Category!=PublicApi
+ - run: dotnet test --no-restore --no-build -c Release --filter Category!=PublicApi -- xUnit.AppDomain=denied
if: matrix.os != 'ubuntu-latest'
pack:
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 9967ecb..b5768c7 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -81,6 +81,6 @@ jobs:
run: |
dotnet sonarscanner begin /k:"$SONAR_PROJECT_KEY" /o:"$SONAR_ORG_KEY" /d:sonar.host.url=https://sonarcloud.io /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/*opencover.xml" $SONAR_PR_ARGS
- dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:ExcludeByFile="test/**/*.cs" /p:VerifyPublicApi=false
+ dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:ExcludeByFile="test/**/*.cs" /p:VerifyPublicApi=false -- xUnit.AppDomain=denied
dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
diff --git a/test/MockHttp.Json.Tests/MockHttp.Json.Tests.csproj b/test/MockHttp.Json.Tests/MockHttp.Json.Tests.csproj
index 6aa238f..aec30bd 100644
--- a/test/MockHttp.Json.Tests/MockHttp.Json.Tests.csproj
+++ b/test/MockHttp.Json.Tests/MockHttp.Json.Tests.csproj
@@ -8,10 +8,6 @@
MockHttp.Json
-
-
-
-
diff --git a/test/MockHttp.Server.Tests/MockHttp.Server.Tests.csproj b/test/MockHttp.Server.Tests/MockHttp.Server.Tests.csproj
index acd249a..02a9388 100644
--- a/test/MockHttp.Server.Tests/MockHttp.Server.Tests.csproj
+++ b/test/MockHttp.Server.Tests/MockHttp.Server.Tests.csproj
@@ -8,10 +8,6 @@
MockHttp
-
-
-
-
diff --git a/test/MockHttp.Testing/XunitAppDomainUnloadHook.cs b/test/MockHttp.Testing/XunitAppDomainUnloadHook.cs
deleted file mode 100644
index 14736be..0000000
--- a/test/MockHttp.Testing/XunitAppDomainUnloadHook.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace MockHttp;
-
-public sealed class XunitAppDomainUnloadHook
-{
- [Fact]
- public void Unload()
- {
- AppDomain.CurrentDomain.DomainUnload += (_, _) =>
- {
- GC.Collect();
- GC.WaitForPendingFinalizers();
- };
- Assert.True(true);
- }
-}
diff --git a/test/MockHttp.Tests/MockHttp.Tests.csproj b/test/MockHttp.Tests/MockHttp.Tests.csproj
index 1f751da..aee4f3b 100644
--- a/test/MockHttp.Tests/MockHttp.Tests.csproj
+++ b/test/MockHttp.Tests/MockHttp.Tests.csproj
@@ -8,10 +8,6 @@
MockHttp
-
-
-
-