Skip to content

fix: unquoted project path and SolutionDir in dotnet build arguments break when the work folder contains spaces #254

Description

@credfeto

Found by AI full-repo code analysis (bugs and performance sweep of non-test projects).

Problem

src/Credfeto.DotNet.Repo.Tools.Build/Services/DotNetBuild.cs:116-130$"build {projectFileName} ..." and ("SolutionDir", buildContext.SourceDirectory) interpolate paths into the argument string without quoting; the argv parser splits on spaces.

Failure scenario

--work "/home/user/My Work": DependencyReducer.BuildProjectAsync runs dotnet build /home/user/My Work/... which fails on every project — and because the dependency reducer interprets build failures as "reference needed", it silently reports every reference as required instead of erroring out.

Suggested fix

Wrap interpolated paths in quotes, or move the command builders to ProcessStartInfo.ArgumentList.

Scope

  • src/Credfeto.DotNet.Repo.Tools.Build/Services/DotNetBuild.cs (all command builders that embed paths)

Related: #217 (same pattern in git command lines).

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI-WorkWork for an AI AgentBugGeneric bug fixLowLow Prioritycredfeto-dotnet-repo-tools-buildChanges in Credfeto.DotNet.Repo.Tools.Build project

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions