diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs
index d941ad54c0..c75fb2567b 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs
@@ -24,7 +24,9 @@ namespace osu.Game.Tests.Visual.Gameplay
GC.WaitForPendingFinalizers();
int count = 0;
- workingWeakReferences.ForEachAlive(_ => count++);
+ foreach (var unused in workingWeakReferences)
+ count++;
+
return count == 1;
});
@@ -34,7 +36,9 @@ namespace osu.Game.Tests.Visual.Gameplay
GC.WaitForPendingFinalizers();
int count = 0;
- playerWeakReferences.ForEachAlive(_ => count++);
+ foreach (var unused in playerWeakReferences)
+ count++;
+
return count == 1;
});
}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index 66d298f8c1..fcfaf71d6a 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -15,7 +15,7 @@
-
+