@@ -804,6 +804,38 @@ public void ArgumentsEndWithDllOrExeShouldNotFail(string arg)
804804 }
805805 }
806806
807+
808+ [ Theory ]
809+ [ InlineData ( "-p:ABC=C:\\ my.dll" ) ]
810+ [ InlineData ( "/p:ABC=C:\\ my.dll" ) ]
811+ [ InlineData ( "-property:ABC=C:\\ my.dll" ) ]
812+ public void PropertiesEndingWithDotDllShouldNotFail ( string property )
813+ {
814+ var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp ( [ ] ) ;
815+
816+ // Call test
817+ // The test will complain about --property:VsTestUseMSBuildOutput=false but
818+ // it is the .dll parameter that is causing this. It forces the command to offload work
819+ // to vstest.console.exe directly, because it thinks there is some test .dll that we should run
820+ // directly, rather than a project file.
821+ // Vstest.console.exe will then complain just about the first unknown parameter.
822+ CommandResult result = new DotnetTestCommand ( Log , disableNewOutput : true )
823+ . WithWorkingDirectory ( testProjectDirectory )
824+ . Execute ( ConsoleLoggerOutputNormal . Concat ( [ property] ) ) ;
825+
826+ // Verify
827+ if ( ! TestContext . IsLocalized ( ) )
828+ {
829+ result . StdOut . Should ( ) . Contain ( "Total tests: 2" ) ;
830+ result . StdOut . Should ( ) . Contain ( "Passed: 1" ) ;
831+ result . StdOut . Should ( ) . Contain ( "Failed: 1" ) ;
832+ result . StdOut . Should ( ) . Contain ( "Passed VSTestPassTest" ) ;
833+ result . StdOut . Should ( ) . Contain ( "Failed VSTestFailTest" ) ;
834+ }
835+
836+ result . ExitCode . Should ( ) . Be ( 1 ) ;
837+ }
838+
807839 private string CopyAndRestoreVSTestDotNetCoreTestApp ( object [ ] parameters , [ CallerMemberName ] string callingMethod = "" )
808840 {
809841 // Copy VSTestCore project in output directory of project dotnet-vstest.Tests
0 commit comments