File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/Cli/dotnet/Commands/Test Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments