Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging causes "More than one build script specified" error if a space exists in the file path #85

Open
cmbaldock opened this issue Feb 10, 2018 · 4 comments
Labels

Comments

@cmbaldock
Copy link

If I try to debug a cake file in Visual Studio Code that contains a space in the directory name then I always get a "More than one build script specified" error. This doesn't occur if there are no spaces in the directory name.

I'm using the standard launch.json file specified below:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
    
        {
            "name": "Cake: Debug Script (CoreCLR)",
            "type": "coreclr",
            "request": "launch",
            "program": "${workspaceRoot}/tools/Cake.CoreCLR/Cake.dll",
            "args": [
                "${workspaceRoot}/build.cake",
                "--debug",
                "--verbosity=diagnostic"
            ],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": true,
            "externalConsole": false
        }
    ]
}

The output when I debug a build.cake file in the directory "D:\Temp\Cake Test" is as follows:

-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Private.CoreLib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\Cake.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\mscorlib.dll'. Cannot find or open the PDB file.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\Cake.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\Cake.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\Autofac.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\Cake.NuGet.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Console.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Reflection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Globalization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Linq.Expressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Reflection.TypeExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Reflection.Emit.ILGeneration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Reflection.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.Reflection.Emit.Lightweight.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'Anonymously Hosted DynamicMethods Assembly'. 
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Reflection.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\System.IO.FileSystem.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Text.Encoding.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
More than one build script specified.
Loaded 'D:\Temp\Cake Test\tools\Cake.CoreCLR\runtimes\win\lib\netstandard1.1\System.Runtime.InteropServices.RuntimeInformation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.9\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Usage: Cake.exe [script] [--verbosity=value]
                [--showdescription] [--dryrun] [..]

Example: Cake.exe
Example: Cake.exe build.cake --verbosity=quiet
Example: Cake.exe build.cake --showdescription

Options:
    --verbosity=value    Specifies the amount of information to be displayed.
                         (Quiet, Minimal, Normal, Verbose, Diagnostic)
    --debug              Performs a debug.
    --showdescription    Shows description about tasks.
    --dryrun             Performs a dry run.
    --version            Displays version information.
    --help               Displays usage information.

The program '[18032] Cake.dll' has exited with code 1 (0x1).

@devlead
Copy link
Member

devlead commented Feb 10, 2018

What happens if you quoted your document? I.e.

"\"${workspaceRoot}/build.cake\""

@cmbaldock
Copy link
Author

I did give that a go. Unfortunately the same error occurred.

@gep13 gep13 added the Bug label Jul 1, 2018
@gep13 gep13 added this to the 0.12.0 milestone Jul 1, 2018
@Marusyk
Copy link

Marusyk commented Jul 7, 2018

I have the same issue

@MeikTranel
Copy link

MeikTranel commented Jul 18, 2018

This is an issue with VSCode's launch behavior. I investigated this months ago. You could fix this in Cake, but the underlying issue is that VSCode escapes quotes from strings in the launch.json before passing it to the executable.

Where exactly this is happening inside vscode i don't know (i am having a really hard time getting behind typescript project structure), but i debugged into omnisharp to know its happening in vscode not in omnisharp.

keith0123 added a commit to auzunov-hhog/Sitecore.HabitatHome.Content that referenced this issue Oct 10, 2018
…use we needed to tie the various user input scripts together before launching the build.ps1. My options were to write an argument builder for the build.ps1, or just move the build.ps1 and edit it a very little bit.

• Adjusted the build.cake for the cake location move.
• Adjusted git.ignore for the cake location move
• Adjusted Readme.md with an accurate and current process

Current Known Bugs:
• If you try to include verbosity along with a target it tell you “More than one build script specified” this is apparently an issue with cake: cake-build/cake-vscode#85
• The Upload script fails in cake for some reason I haven’t investigated at all, might be a simple fix idk yet
jeanfrancoislarente pushed a commit to Sitecore/Sitecore.Demo.Platform that referenced this issue Dec 10, 2018
…use we needed to tie the various user input scripts together before launching the build.ps1. My options were to write an argument builder for the build.ps1, or just move the build.ps1 and edit it a very little bit.

• Adjusted the build.cake for the cake location move.
• Adjusted git.ignore for the cake location move
• Adjusted Readme.md with an accurate and current process

Current Known Bugs:
• If you try to include verbosity along with a target it tell you “More than one build script specified” this is apparently an issue with cake: cake-build/cake-vscode#85
• The Upload script fails in cake for some reason I haven’t investigated at all, might be a simple fix idk yet
@gep13 gep13 removed this from the v0.12.0 milestone Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants