Microsoft.Terminal.Settings.ModelLib.vcxproj fails to build due to missing $quote; in <Exec Command= ...> #17062

Open
opened 2026-01-31 05:31:11 +00:00 by claunia · 0 comments
Owner

Originally created by @RonWright on GitHub (Mar 24, 2022).

Windows Terminal version

No response

Windows build number

No response

Other Software

VisualStudio 2022.

Steps to reproduce

Microsoft.Terminal.Settings.ModelLib.vcxproj fails to build when the source directory path contains spaces (as in "P:\GitHub Projects...").
Microsoft.Terminal.Settings.ModelLib.vcxproj has three <Exec Command=pwsh.exe ...> nodes which do not have double-quotes (") around the file spec for the GenerateHeaderForJson.ps1 file. Without the double-quotes the execution of pwsh.exe fails.

Expected Behavior

Modify the section of Microsoft.Terminal.Settings.ModelLib.vcxproj containing the Commands to be executed. Following is the changed section:

Changes.txt

Actual Behavior

Without the additional "'s in the project file, the Microsoft.Terminal.Settings.ModelLib project fails to build.

Originally created by @RonWright on GitHub (Mar 24, 2022). ### Windows Terminal version _No response_ ### Windows build number _No response_ ### Other Software VisualStudio 2022. ### Steps to reproduce Microsoft.Terminal.Settings.ModelLib.vcxproj fails to build when the source directory path contains spaces (as in "P:\GitHub Projects\..."). Microsoft.Terminal.Settings.ModelLib.vcxproj has three <Exec Command=pwsh.exe ...> nodes which do not have double-quotes (&quot;) around the file spec for the GenerateHeaderForJson.ps1 file. Without the double-quotes the execution of pwsh.exe fails. ### Expected Behavior Modify the section of Microsoft.Terminal.Settings.ModelLib.vcxproj containing the Commands to be executed. Following is the changed section: <!-- This target will take our defaults.json and stamp it into a .h file that we can include in the code directly. This way, we don't need to worry about failing to load the default settings at runtime. --> <Target Name="_TerminalAppGenerateDefaultsH" Inputs="defaults.json" Outputs="Generated Files\defaults.h" BeforeTargets="BeforeClCompile"> <Exec Command="pwsh.exe -NoProfile –ExecutionPolicy Unrestricted &quot;$(OpenConsoleDir)\tools\GenerateHeaderForJson.ps1&quot; -JsonFile defaults.json -OutPath &quot;Generated Files\defaults.h&quot; -VariableName DefaultJson" /> </Target> <!-- A different set of defaults for Universal variant --> <Target Name="_TerminalAppGenerateDefaultsUniversalH" Inputs="defaults-universal.json" Outputs="Generated Files\defaults-universal.h" BeforeTargets="BeforeClCompile"> <Exec Command="pwsh.exe -NoProfile –ExecutionPolicy Unrestricted &quot;$(OpenConsoleDir)\tools\GenerateHeaderForJson.ps1&quot; -JsonFile defaults-universal.json -OutPath &quot;Generated Files\defaults-universal.h&quot; -VariableName DefaultUniversalJson" /> </Target> <!-- Same as above, but for the default settings.json template --> <Target Name="_TerminalAppGenerateUserSettingsH" Inputs="userDefaults.json" Outputs="Generated Files\userDefaults.h" BeforeTargets="BeforeClCompile"> <Exec Command="pwsh.exe -NoProfile –ExecutionPolicy Unrestricted &quot;$(OpenConsoleDir)\tools\GenerateHeaderForJson.ps1&quot; -JsonFile userDefaults.json -OutPath &quot;Generated Files\userDefaults.h&quot; -VariableName UserSettingsJson" /> </Target> [Changes.txt](https://github.com/microsoft/terminal/files/8338413/Changes.txt) ### Actual Behavior Without the additional &quot;'s in the project file, the Microsoft.Terminal.Settings.ModelLib project fails to build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17062