Testing against a pre-release version of .NET 7 SDK brings in a dependency for Microsoft.NETCore.App.Host 3.1.31, which isn't released. To work around this dependency, I implemented a hack. This hack should be removed once tests target the .NET 7 GA release.