diff --git a/src/Microsoft.TestPlatform.Common/Utilities/FakesUtilities.cs b/src/Microsoft.TestPlatform.Common/Utilities/FakesUtilities.cs index 8c24158902..a269a16d18 100644 --- a/src/Microsoft.TestPlatform.Common/Utilities/FakesUtilities.cs +++ b/src/Microsoft.TestPlatform.Common/Utilities/FakesUtilities.cs @@ -81,7 +81,8 @@ public static string GenerateFakesSettingsForRunConfiguration(string[] sources, // Since there are no FrameworkVersion values for .Net Core 2.0 +, we check TargetFramework instead // and default to FrameworkCore10 for .Net Core if (targetFramework.Name.IndexOf("netstandard", StringComparison.OrdinalIgnoreCase) >= 0 || - targetFramework.Name.IndexOf("netcoreapp", StringComparison.OrdinalIgnoreCase) >= 0) + targetFramework.Name.IndexOf("netcoreapp", StringComparison.OrdinalIgnoreCase) >= 0 || + targetFramework.Name.IndexOf("net5", StringComparison.OrdinalIgnoreCase) >= 0) { return FrameworkVersion.FrameworkCore10; } diff --git a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs index 9794f2fe7a..eb4149d6b0 100644 --- a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs +++ b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs @@ -346,7 +346,8 @@ public bool CanExecuteCurrentRunConfiguration(string runsettingsXml) // This is expected to be called once every run so returning a new instance every time. if (framework.Name.IndexOf("netstandard", StringComparison.OrdinalIgnoreCase) >= 0 - || framework.Name.IndexOf("netcoreapp", StringComparison.OrdinalIgnoreCase) >= 0) + || framework.Name.IndexOf("netcoreapp", StringComparison.OrdinalIgnoreCase) >= 0 + || framework.Name.IndexOf("net5", StringComparison.OrdinalIgnoreCase) >= 0) { return true; }