aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Build fails on publish when user's home directory has a white space #604

Closed DavidObando closed 8 years ago

DavidObando commented 8 years ago

Ran into this while running in a personal computer.

At some point in the build we run:

      Executing command dotnet publish C:\github\aspnet\MusicStore\src\MusicStore -o C:\Users\David Obando\AppData\Local\Temp\b4706cc2-0dd3-4c5c-bf02-0e7c8526d3a6 --framework netstandardapp1.5

Which fails with the following message:

      Unrecognized command or argument 'Obando\AppData\Local\Temp\b4706cc2-0dd3-4c5c-bf02-0e7c8526d3a6'
        C:\github\aspnet\MusicStore\test\E2ETests\PublishAndRunTests.cs(32,0): at E2ETests.PublishAndRunTests_OnX64.<WindowsOS>d__0.MoveNext()
warn        --- End of stack trace from previous location where exception was thrown ---
: Publish:Kestrel:CoreClr:x64:False[0]
      Host process already exited or never started successfully.
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
warn           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
: Publish:Kestrel:CoreClr:x64:False[0]
      Failed to delete directory : Could not find a part of the path 'C:\Users\David Obando\AppData\Local\Temp\b4706cc2-0dd3-4c5c-bf02-0e7c8526d3a6'.
        --- End of stack trace from previous location where exception was thrown ---
info           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

Quick workaround: rename the user home folder or use a different user with no spaces in the user name. Found a way to rename here.

DavidObando commented 8 years ago

Issue is external, rooted here: https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs#L52. Opening a bug in Hosting.