diff --git a/src/dotnet-ef/RootCommand.cs b/src/dotnet-ef/RootCommand.cs index 412a4d37be7..c9cf06f8c98 100644 --- a/src/dotnet-ef/RootCommand.cs +++ b/src/dotnet-ef/RootCommand.cs @@ -91,7 +91,8 @@ protected override int Execute(string[] _) Path.GetDirectoryName(typeof(Program).Assembly.Location)!, "tools"); - var targetDir = Path.GetFullPath(Path.Combine(startupProject.ProjectDir!, startupProject.OutputPath!)); + var targetDir = Path.GetFullPath(Path.Combine(startupProject.ProjectDir!, startupProject.OutputPath!)) + .Replace('\\', Path.DirectorySeparatorChar); var targetPath = Path.Combine(targetDir, project.TargetFileName!); var startupTargetPath = Path.Combine(targetDir, startupProject.TargetFileName!); var depsFile = Path.Combine(