i'm trying create build scripts psake our company c# project in .net 3.5, when run it, fails errors
default parameter specifiers not permitted
i google out , looks problem of .net 3.5 not allow default parameters in functions.
however strange same project built msbuild.exe has succeeded. tried set $framework variable of psake '3.5x86' , '3.5x64' none of helps.
do have idea wrong psake or if there secret variable i'm missing?
my psake script:
$scriptdir = split-path -path $myinvocation.mycommand.definition -parent $framework = '3.5x86' $serversln = $scriptdir+'\..\server\server.sln' $clientsln = $scriptdir+'\..\client\client.sln' $outdirserver = $scriptdir+'\..\binaries\server' $outdirclient = $scriptdir+'\..\binaries\client' task default -depends full task full -depends clean, buildserver, buildclient #, buildaccs, deployrelease task buildserver { #framework '3.5' exec { msbuild $serversln /t:build /p:configuration=release /v:quiet } } task buildclient { #framework '3.5' exec { msbuild $clientsln /t:build /p:configuration=deploy /v:quiet } exec { msbuild $clientsln /t:build /p:configuration=release /v:quiet } } task clean { write-host cleaning if (test-path $outdirclient) { rd $outdirclient -rec -force | out-null } if (test-path $outdirserver) { rd $outdirserver -rec -force | out-null } }
output of script:
$scriptdir = split-path -path $myinvocation.mycommand.definition -parent $framework = '3.5x86' $serversln = $scriptdir+'\..\server\server.sln' $clientsln = $scriptdir+'\..\client\client.sln' $outdirserver = $scriptdir+'\..\binaries\server' $outdirclient = $scriptdir+'\..\binaries\client' task default -depends full task full -depends clean, buildserver, buildclient #, buildaccs, deployrelease task buildserver { #framework '3.5' exec { msbuild $serversln /t:build /p:configuration=release /v:quiet } } task buildclient { #framework '3.5' exec { msbuild $clientsln /t:build /p:configuration=deploy /v:quiet } exec { msbuild $clientsln /t:build /p:configuration=release /v:quiet } } task clean { write-host cleaning if (test-path $outdirclient) { rd $outdirclient -rec -force | out-null } if (test-path $outdirserver) { rd $outdirserver -rec -force | out-null } }
the $framework
variable deprecated in latest versions, should use framework
function instead. apparently not work. looks bug in psake.
Comments
Post a Comment