File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Cli/dotnet/Commands/Run Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -529,8 +529,10 @@ internal static void ThrowUnableToRunError(ProjectInstance project)
529529 projectFileOrDirectoryPath = Directory . GetCurrentDirectory ( ) ;
530530 }
531531
532- // Normalize path separators to handle Windows-style paths on non-Windows platforms
533- // First convert backslashes to forward slashes on non-Windows, then get the full path
532+ // Normalize path separators to handle Windows-style paths on non-Windows platforms.
533+ // This is supported for backward compatibility in 'dotnet run' only, not for all CLI commands.
534+ // Converting backslashes to forward slashes allows PowerShell scripts using Windows-style paths
535+ // to work cross-platform, maintaining compatibility with .NET 9 behavior.
534536 if ( Path . DirectorySeparatorChar != '\\ ' )
535537 {
536538 projectFileOrDirectoryPath = projectFileOrDirectoryPath . Replace ( '\\ ' , '/' ) ;
You can’t perform that action at this time.
0 commit comments