Skip to content

Commit 0006c13

Browse files
authored
Update SolutionAndProjectUtility.cs
1 parent f9c489c commit 0006c13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ public static IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModule
230230

231231
string targetFramework = project.GetPropertyValue(ProjectProperties.TargetFramework);
232232
RunProperties runProperties = GetRunProperties(project, loggers);
233+
234+
// dotnet run throws the same if RunCommand is null or empty.
235+
// In dotnet test, we are additionally checking that RunCommand is not dll.
236+
// In any "default" scenario, RunCommand is never dll.
237+
// If we found it to be dll, that is user explicitly setting RunCommand incorrectly.
233238
if (string.IsNullOrEmpty(runProperties.RunCommand) || runProperties.RunCommand.HasExtension(CliConstants.DLLExtension))
234239
{
235240
throw new GracefulException(
@@ -238,7 +243,6 @@ public static IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModule
238243
"dotnet test",
239244
"OutputType",
240245
project.GetPropertyValue("OutputType")));
241-
242246
}
243247

244248
string projectFullPath = project.GetPropertyValue(ProjectProperties.ProjectFullPath);

0 commit comments

Comments
 (0)