fsprojects / Paket.VisualStudio

Manage your Paket (http://fsprojects.github.io/Paket/) dependencies from Visual Studio!
MIT License
147 stars 51 forks source link

"Add Package" faults if project path has spaces ? #165

Open red-swan opened 6 years ago

red-swan commented 6 years ago

Description

I can successfully add packages to a project if the path to fsproj has no spaces in it. If I try to add the same package to a project with spaces in its path, Paket fails with the following error:

Paket.VisualStudio.Utils.PaketRuntimeException: Error running: C:\Projects\2018-02-20 Web Api Demo\AIX Web Service\.paket\paket.exe add Suave --project C:\Projects\2018-02-20 Web Api Demo\AIX Web Service\AIX Web Service\AIX Web Service.fsproj
Exit code '1' returned ---> System.Exception: Exit code '1' returned
   at Paket.VisualStudio.Utils.PaketLauncher.LaunchProcess(String WorkingDirectory, String ProcessStart, String PaketSubCommand, DataReceivedEventHandler PaketDataReceivedHandler)
   --- End of inner exception stack trace ---
   at Paket.VisualStudio.Utils.PaketLauncher.LaunchProcess(String WorkingDirectory, String ProcessStart, String PaketSubCommand, DataReceivedEventHandler PaketDataReceivedHandler)
   at Paket.VisualStudio.Utils.PaketLauncher.LaunchPaket(String SolutionDirectory, String PaketSubCommand, DataReceivedEventHandler PaketDataReceivedHandler)
   at Paket.VisualStudio.Commands.AddPackageProcess.<>c__DisplayClass0_0.<ShowAddPackageDialog>b__2(NugetResult result)
   at Paket.VisualStudio.Commands.PackageGui.AddPackageViewModel.<>c__DisplayClass26_0.<.ctor>b__21()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Repro steps

Please provide the steps required to reproduce the problem

  1. Right click "References" for a solution

  2. Click "Add Package"

  3. Choose a package (in my case, this was "Suave")

  4. Click "Add Nuget Package"

  5. Watch failure occur

Expected behavior

I would expect the selected package to load to the solution regardless of project path.

Actual behavior

The package will not load for projects in directories with spaces.

Known workarounds

Change my project folder's path's spaces to dashes

Related information