File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
55---
66
7+ ## [ 0.5.0] - Unreleased
8+
9+ - Define parameter broken - MSBuild thinks it's a switch
10+ [ #16 ] ( https://github.com/continuous-delphi/delphi-msbuild/issues/16 )
11+
712## [ 0.4.0] - 2026-03-17
813
914- Ensure ` PowerShell 5.1 ` compatibility for the delphi-msbuild.ps1 script
Original file line number Diff line number Diff line change @@ -213,9 +213,14 @@ function Invoke-MsbuildProject {
213213 $msbuildArgs += " /p:DCC_UnitSearchPath=$unitSearchValue "
214214 }
215215
216+ if ($UnitSearchPath.Count -gt 0 ) {
217+ $unitSearchValue = ' $(DCC_UnitSearchPath);' + ($UnitSearchPath -join ' ;' )
218+ $msbuildArgs += " /p:DCC_UnitSearchPath=`" $unitSearchValue `" "
219+ }
220+
216221 if ($Define.Count -gt 0 ) {
217222 $defineValue = ' $(DCC_Define);' + ($Define -join ' ;' )
218- $msbuildArgs += " /p:DCC_Define=$defineValue "
223+ $msbuildArgs += " /p:DCC_Define=`" $defineValue `" "
219224 }
220225
221226 return Invoke-MsbuildExe - Arguments $msbuildArgs - ShowOutput:$ShowOutput
Original file line number Diff line number Diff line change @@ -508,8 +508,8 @@ Describe 'Invoke-MsbuildProject' {
508508 - Define @ (' MYFLAG' )
509509 }
510510
511- It ' includes /p:DCC_Define=$(DCC_Define);MYFLAG' {
512- $script :capturedArgs | Should - Contain ' /p:DCC_Define=$(DCC_Define);MYFLAG'
511+ It ' includes /p:DCC_Define=" $(DCC_Define);MYFLAG" ' {
512+ $script :capturedArgs | Should - Contain ' /p:DCC_Define=" $(DCC_Define);MYFLAG" '
513513 }
514514
515515 }
@@ -532,8 +532,8 @@ Describe 'Invoke-MsbuildProject' {
532532 - Define @ (' MYFLAG' , ' USE_JEDI_JCL' )
533533 }
534534
535- It ' includes /p:DCC_Define=$(DCC_Define);MYFLAG;USE_JEDI_JCL' {
536- $script :capturedArgs | Should - Contain ' /p:DCC_Define=$(DCC_Define);MYFLAG;USE_JEDI_JCL'
535+ It ' includes /p:DCC_Define=" $(DCC_Define);MYFLAG;USE_JEDI_JCL" ' {
536+ $script :capturedArgs | Should - Contain ' /p:DCC_Define=" $(DCC_Define);MYFLAG;USE_JEDI_JCL" '
537537 }
538538
539539 }
You can’t perform that action at this time.
0 commit comments