-ScriptArgs not working with "=" in other arguments
I am using the following arguments in PowerShell with the bootstrapper:
.\build.ps1 -target=build -configuration=Debug -ScriptArgs='--packageVersion="1.0.0-dev"'
What You Are Seeing?
packageVersion is staying set to the default value, "1.0.0".
What is Expected?
packageVersion = "1.0.0-dev"
When I remove '=' from arguments, I get the expected results:
.\build.ps1 -target build -configuration Debug -ScriptArgs '--packageVersion="1.0.0-dev"'
What version of Cake are you using?
v0.32.1
Are you running on a 32 or 64 bit system?
64-bit
What environment are you running on? Windows? Linux? Mac?
Windows 10
Are you running on a CI Server? If so, which one?
TeamCity
How Did You Get This To Happen? (Steps to Reproduce)
Output Log
Module directory does not exist. NuGet.config not found. Analyzing build script... Analyzing C:/bitbucket/redacted/redacted-grpc/build.cake... Processing build script... Installing tools... Found package 'NUnit.ConsoleRunner 3.4.0' in 'C:/bitbucket/redacted/redacted-grpc/tools'. Package NUnit.ConsoleRunner.3.4.0 has already been installed. Successfully installed 'NUnit.ConsoleRunner 3.4.0' to C:/bitbucket/redacted/redacted-grpc/tools Executing nuget actions took 42.56 ms Adding assembly reference to mscorlib.dll... Adding assembly reference to System.Core.dll... Adding assembly reference to Cake.Core.dll... Adding assembly reference to Cake.Common.dll... Adding assembly reference to Cake.exe... Adding assembly reference to System.dll... Adding assembly reference to System.Xml.dll... Adding assembly reference to System.Xml.Linq.dll... Adding assembly reference to System.Data.dll... Adding assembly reference to System.Runtime.dll... Adding assembly reference to System.Collections.dll... Adding assembly reference to netstandard.dll... Importing namespace Cake.Common... Importing namespace Cake.Common.Build... Importing namespace Cake.Common.Build.AppVeyor... Importing namespace Cake.Common.Build.AppVeyor.Data... Importing namespace Cake.Common.Build.Bamboo... Importing namespace Cake.Common.Build.Bamboo.Data... Importing namespace Cake.Common.Build.BitbucketPipelines... Importing namespace Cake.Common.Build.BitbucketPipelines.Data... Importing namespace Cake.Common.Build.Bitrise... Importing namespace Cake.Common.Build.Bitrise.Data... Importing namespace Cake.Common.Build.ContinuaCI... Importing namespace Cake.Common.Build.ContinuaCI.Data... Importing namespace Cake.Common.Build.GitLabCI... Importing namespace Cake.Common.Build.GitLabCI.Data... Importing namespace Cake.Common.Build.GoCD... Importing namespace Cake.Common.Build.GoCD.Data... Importing namespace Cake.Common.Build.Jenkins... Importing namespace Cake.Common.Build.Jenkins.Data... Importing namespace Cake.Common.Build.MyGet... Importing namespace Cake.Common.Build.TeamCity... Importing namespace Cake.Common.Build.TFBuild... Importing namespace Cake.Common.Build.TFBuild.Data... Importing namespace Cake.Common.Build.TravisCI... Importing namespace Cake.Common.Build.TravisCI.Data... Importing namespace Cake.Common.Diagnostics... Importing namespace Cake.Common.IO... Importing namespace Cake.Common.IO.Paths... Importing namespace Cake.Common.Net... Importing namespace Cake.Common.Security... Importing namespace Cake.Common.Solution... Importing namespace Cake.Common.Solution.Project... Importing namespace Cake.Common.Solution.Project.Properties... Importing namespace Cake.Common.Solution.Project.XmlDoc... Importing namespace Cake.Common.Text... Importing namespace Cake.Common.Tools... Importing namespace Cake.Common.Tools.Cake... Importing namespace Cake.Common.Tools.Chocolatey... Importing namespace Cake.Common.Tools.Chocolatey.ApiKey... Importing namespace Cake.Common.Tools.Chocolatey.Config... Importing namespace Cake.Common.Tools.Chocolatey.Download... Importing namespace Cake.Common.Tools.Chocolatey.Features... Importing namespace Cake.Common.Tools.Chocolatey.Install... Importing namespace Cake.Common.Tools.Chocolatey.New... Importing namespace Cake.Common.Tools.Chocolatey.Pack... Importing namespace Cake.Common.Tools.Chocolatey.Pin... Importing namespace Cake.Common.Tools.Chocolatey.Push... Importing namespace Cake.Common.Tools.Chocolatey.Sources... Importing namespace Cake.Common.Tools.Chocolatey.Uninstall... Importing namespace Cake.Common.Tools.Chocolatey.Upgrade... Importing namespace Cake.Common.Tools.DotCover... Importing namespace Cake.Common.Tools.DotCover.Analyse... Importing namespace Cake.Common.Tools.DotCover.Cover... Importing namespace Cake.Common.Tools.DotCover.Merge... Importing namespace Cake.Common.Tools.DotCover.Report... Importing namespace Cake.Common.Tools.DotNetCore... Importing namespace Cake.Common.Tools.DotNetCore.Build... Importing namespace Cake.Common.Tools.DotNetCore.BuildServer... Importing namespace Cake.Common.Tools.DotNetCore.Clean... Importing namespace Cake.Common.Tools.DotNetCore.Execute... Importing namespace Cake.Common.Tools.DotNetCore.MSBuild... Importing namespace Cake.Common.Tools.DotNetCore.NuGet.Delete... Importing namespace Cake.Common.Tools.DotNetCore.NuGet.Push... Importing namespace Cake.Common.Tools.DotNetCore.Pack... Importing namespace Cake.Common.Tools.DotNetCore.Publish... Importing namespace Cake.Common.Tools.DotNetCore.Restore... Importing namespace Cake.Common.Tools.DotNetCore.Run... Importing namespace Cake.Common.Tools.DotNetCore.Test... Importing namespace Cake.Common.Tools.DotNetCore.Tool... Importing namespace Cake.Common.Tools.DotNetCore.VSTest... Importing namespace Cake.Common.Tools.DupFinder... Importing namespace Cake.Common.Tools.Fixie... Importing namespace Cake.Common.Tools.GitLink... Importing namespace Cake.Common.Tools.GitReleaseManager... Importing namespace Cake.Common.Tools.GitReleaseManager.AddAssets... Importing namespace Cake.Common.Tools.GitReleaseManager.Close... Importing namespace Cake.Common.Tools.GitReleaseManager.Create... Importing namespace Cake.Common.Tools.GitReleaseManager.Export... Importing namespace Cake.Common.Tools.GitReleaseManager.Label... Importing namespace Cake.Common.Tools.GitReleaseManager.Publish... Importing namespace Cake.Common.Tools.GitReleaseNotes... Importing namespace Cake.Common.Tools.GitVersion... Importing namespace Cake.Common.Tools.ILMerge... Importing namespace Cake.Common.Tools.ILRepack... Importing namespace Cake.Common.Tools.InnoSetup... Importing namespace Cake.Common.Tools.InspectCode... Importing namespace Cake.Common.Tools.MSBuild... Importing namespace Cake.Common.Tools.MSpec... Importing namespace Cake.Common.Tools.MSTest... Importing namespace Cake.Common.Tools.NSIS... Importing namespace Cake.Common.Tools.NuGet... Importing namespace Cake.Common.Tools.NuGet.Add... Importing namespace Cake.Common.Tools.NuGet.Init... Importing namespace Cake.Common.Tools.NuGet.Install... Importing namespace Cake.Common.Tools.NuGet.List... Importing namespace Cake.Common.Tools.NuGet.Pack... Importing namespace Cake.Common.Tools.NuGet.Push... Importing namespace Cake.Common.Tools.NuGet.Restore... Importing namespace Cake.Common.Tools.NuGet.SetApiKey... Importing namespace Cake.Common.Tools.NuGet.SetProxy... Importing namespace Cake.Common.Tools.NuGet.Sources... Importing namespace Cake.Common.Tools.NuGet.Update... Importing namespace Cake.Common.Tools.NUnit... Importing namespace Cake.Common.Tools.OctopusDeploy... Importing namespace Cake.Common.Tools.OpenCover... Importing namespace Cake.Common.Tools.ReportGenerator... Importing namespace Cake.Common.Tools.ReportUnit... Importing namespace Cake.Common.Tools.Roundhouse... Importing namespace Cake.Common.Tools.SignTool... Importing namespace Cake.Common.Tools.SpecFlow... Importing namespace Cake.Common.Tools.SpecFlow.StepDefinitionReport... Importing namespace Cake.Common.Tools.SpecFlow.TestExecutionReport... Importing namespace Cake.Common.Tools.TextTransform... Importing namespace Cake.Common.Tools.VSTest... Importing namespace Cake.Common.Tools.VSWhere... Importing namespace Cake.Common.Tools.VSWhere.All... Importing namespace Cake.Common.Tools.VSWhere.Latest... Importing namespace Cake.Common.Tools.VSWhere.Legacy... Importing namespace Cake.Common.Tools.VSWhere.Product... Importing namespace Cake.Common.Tools.WiX... Importing namespace Cake.Common.Tools.WiX.Heat... Importing namespace Cake.Common.Tools.XBuild... Importing namespace Cake.Common.Tools.XUnit... Importing namespace Cake.Common.Xml... Importing namespace Cake.Core... Importing namespace Cake.Core.Diagnostics... Importing namespace Cake.Core.IO... Importing namespace Cake.Core.Scripting... Importing namespace System... Importing namespace System.Collections.Generic... Importing namespace System.IO... Importing namespace System.Linq... Importing namespace System.Text... Importing namespace System.Threading.Tasks... Compiling build script... My target = build My configuration = Debug My packageVersion = 1.0.0
======================================== Clean
Executing task: Clean Cleaning directory C:/bitbucket/redacted/redacted-grpc/src/redactedGrpc/bin/Debug Cleaning directory C:/bitbucket/redacted/redacted-grpc/nuget Finished executing task: Clean
======================================== Restore-NuGet-Packages
Executing task: Restore-NuGet-Packages Executing: "C:/bitbucket/redacted/redacted-grpc/tools/NuGet.exe" restore "C:/bitbucket/redacted/redacted-grpc/src/redacted.redacted.redactedGrpc.sln" -NonInteractive MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin'. All packages listed in packages.config are already installed. Committing restore... Assets file has not changed. Skipping assets file writing. Path: C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\obj\project.assets.json Restore completed in 67.15 ms for C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj.
NuGet Config files used: C:\Users\CarteriTrellis\AppData\Roaming\NuGet\NuGet.Config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
https://api.nuget.org/v3/index.json https://artifactory.redacted.com/artifactory/api/nuget/redacted Finished executing task: Restore-NuGet-Packages======================================== Build
Executing task: Build Executing: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/MSBuild/15.0/Bin/amd64/MSBuild.exe" /v:normal /p:Configuration="Debug" /target:Build "C:/bitbucket/redacted/redacted-grpc/src/redacted.redacted.redactedGrpc.sln" Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Build started 4/17/2019 2:22:06 PM. Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" on node 1 (Build target(s)). ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (1) is building "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj" (2) on node 1 (default targets). _HandlePackageFileConflicts: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Google.Protobuf, Version=3.7.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL' and 'Reference:C:\Users\CarteriTrellis.nuget\packages\google.protobuf\3.7.0\lib\net45\Google.Protobuf.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL' and 'Reference:C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\lib\net45\Grpc.Core.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Grpc.Core.Api, Version=0.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL' and 'Reference:C:\Users\CarteriTrellis.nuget\packages\grpc.core.api\1.19.0\lib\net45\Grpc.Core.Api.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Interactive.Async, Version=3.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL' and 'Reference:C:\Users\CarteriTrellis.nuget\packages\system.interactive.async\3.2.0\lib\net46\System.Interactive.Async.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Google.Protobuf, Version=3.7.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL' and 'CopyLocal:C:\Users\CarteriTrellis.nuget\packages\google.protobuf\3.7.0\lib\net45\Google.Protobuf.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL' and 'CopyLocal:C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\lib\net45\Grpc.Core.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:Grpc.Core.Api, Version=0.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL' and 'CopyLocal:C:\Users\CarteriTrellis.nuget\packages\grpc.core.api\1.19.0\lib\net45\Grpc.Core.Api.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Interactive.Async, Version=3.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL' and 'CopyLocal:C:\Users\CarteriTrellis.nuget\packages\system.interactive.async\3.2.0\lib\net46\System.Interactive.Async.dll'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj] GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. _Protobuf_GatherStaleBatched: Skipping target "_Protobuf_GatherStaleBatched" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. _CopyFilesMarkedCopyLocal: Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\lib\net45\Grpc.Core.dll" to "bin\Debug\Grpc.Core.dll". Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\runtimes\win\native\grpc_csharp_ext.x64.dll" to "bin\Debug\grpc_csharp_ext.x64.dll". Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\runtimes\win\native\grpc_csharp_ext.x86.dll" to "bin\Debug\grpc_csharp_ext.x86.dll". Copying file from "C:\Users\CarteriTrellis.nuget\packages\google.protobuf\3.7.0\lib\net45\Google.Protobuf.dll" to "bin\Debug\Google.Protobuf.dll". Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core\1.19.0\lib\net45\Grpc.Core.pdb" to "bin\Debug\Grpc.Core.pdb". Copying file from "C:\Users\CarteriTrellis.nuget\packages\google.protobuf\3.7.0\lib\net45\Google.Protobuf.pdb" to "bin\Debug\Google.Protobuf.pdb". Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core.api\1.19.0\lib\net45\Grpc.Core.Api.dll" to "bin\Debug\Grpc.Core.Api.dll". Copying file from "C:\Users\CarteriTrellis.nuget\packages\grpc.core.api\1.19.0\lib\net45\Grpc.Core.Api.pdb" to "bin\Debug\Grpc.Core.Api.pdb". Copying file from "C:\Users\CarteriTrellis.nuget\packages\system.interactive.async\3.2.0\lib\net46\System.Interactive.Async.dll" to "bin\Debug\System.Interactive.Async.dll". Touching "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\obj\Debug\redacted.redacted.redactedGrpc.csproj.CopyComplete". _CopyOutOfDateSourceItemsToOutputDirectory: Building target "_CopyOutOfDateSourceItemsToOutputDirectory" partially, because some output files are out of date with respect to their input files. Copying file from "C:\bitbucket\redacted\redacted-grpc\src\packages\Grpc.Core.1.19.0\runtimes\osx\native\libgrpc_csharp_ext.x64.dylib" to "bin\Debug\libgrpc_csharp_ext.x64.dylib". Copying file from "C:\bitbucket\redacted\redacted-grpc\src\packages\Grpc.Core.1.19.0\runtimes\linux\native\libgrpc_csharp_ext.x64.so" to "bin\Debug\libgrpc_csharp_ext.x64.so". Copying file from "C:\bitbucket\redacted\redacted-grpc\src\packages\Grpc.Core.1.19.0\runtimes\osx\native\libgrpc_csharp_ext.x86.dylib" to "bin\Debug\libgrpc_csharp_ext.x86.dylib". Copying file from "C:\bitbucket\redacted\redacted-grpc\src\packages\Grpc.Core.1.19.0\runtimes\linux\native\libgrpc_csharp_ext.x86.so" to "bin\Debug\libgrpc_csharp_ext.x86.so". CopyFilesToOutputDirectory: Copying file from "obj\Debug\redacted.redacted.redactedGrpc.dll" to "bin\Debug\redacted.redacted.redactedGrpc.dll". redacted.redacted.redactedGrpc -> C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\bin\Debug\redacted.redacted.redactedGrpc.dll Copying file from "obj\Debug\redacted.redacted.redactedGrpc.pdb" to "bin\Debug\redacted.redacted.redactedGrpc.pdb". Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\redacted.redacted.redactedGrpc.csproj" (default targets). Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (1) is building "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServer\redacted.redacted.redactedGrpcServer.csproj" (3) on node 1 (default targets). GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. _CopyFilesMarkedCopyLocal: Touching "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServer\obj\Debug\redacted.redacted.redactedGrpcServer.csproj.CopyComplete". _CopyOutOfDateSourceItemsToOutputDirectory: Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: redacted.redacted.redactedGrpcServer -> C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServer\bin\Debug\redacted.redacted.redactedGrpcServer.dll Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServer\redacted.redacted.redactedGrpcServer.csproj" (default targets). Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (1) is building "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerConsole\redacted.redacted.redactedGrpcServer.Console.csproj" (4) on node 1 (default targets). GenerateBindingRedirects: No suggested binding redirects from ResolveAssemblyReferences. GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. _CopyFilesMarkedCopyLocal: Touching "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerConsole\obj\Debug\redacted.redacted.redactedGrpcServer.Console.csproj.CopyComplete". _CopyOutOfDateSourceItemsToOutputDirectory: Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files. _CopyAppConfigFile: Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: redacted.redacted.redactedGrpcServer.Console -> C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerConsole\bin\Debug\redacted.redacted.redactedGrpcServer.Console.exe Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerConsole\redacted.redacted.redactedGrpcServer.Console.csproj" (default targets). Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (1) is building "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcClientConsole\redacted.redacted.redactedGrpcClient.Console.csproj" (5) on node 1 (default targets). GenerateBindingRedirects: No suggested binding redirects from ResolveAssemblyReferences. GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. _CopyFilesMarkedCopyLocal: Touching "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcClientConsole\obj\Debug\redacted.redacted.redactedGrpcClient.Console.csproj.CopyComplete". _CopyOutOfDateSourceItemsToOutputDirectory: Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files. _CopyAppConfigFile: Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: redacted.redacted.redactedGrpcClient.Console -> C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcClientConsole\bin\Debug\redacted.redacted.redactedGrpcClient.Console.exe Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcClientConsole\redacted.redacted.redactedGrpcClient.Console.csproj" (default targets). Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (1) is building "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerTests\redacted.redacted.redactedGrpcServer.Tests.csproj" (6) on node 1 (default targets). GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: redacted.redacted.redactedGrpcServer.Tests -> C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerTests\bin\Debug\redacted.redacted.redactedGrpcServer.Tests.dll Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServerTests\redacted.redacted.redactedGrpcServer.Tests.csproj" (default targets). Done Building Project "C:\bitbucket\redacted\redacted-grpc\src\redacted.redacted.redactedGrpc.sln" (Build target(s)).
Build succeeded. 0 Warning(s) 0 Error(s)
Time Elapsed 00:00:01.06 Executing: "C:/bitbucket/redacted/redacted-grpc/tools/NuGet.exe" pack -OutputDirectory "C:/bitbucket/redacted/redacted-grpc/nuget" "C:/bitbucket/redacted/redacted-grpc/src/redactedGrpc/redacted.redacted.redactedGrpc.csproj" -IncludeReferencedProjects -Properties "Version=1.0.0;Configuration=Debug;Description=redactedGrpc Artifact" -Exclude *.x64.*;*.x86.* Attempting to build package from 'redacted.redacted.redactedGrpc.csproj'. MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin'. Packing files from 'C:\bitbucket\redacted\redacted-grpc\src\redactedGrpc\bin\Debug'. Using 'redacted.redacted.redactedGrpc.nuspec' for metadata. Found packages.config. Using packages listed as dependencies Successfully created package 'C:\bitbucket\redacted\redacted-grpc\nuget\redacted.redacted.redactedGrpc.1.0.0.nupkg'. Executing: "C:/bitbucket/redacted/redacted-grpc/tools/NuGet.exe" pack -OutputDirectory "C:/bitbucket/redacted/redacted-grpc/nuget" "C:/bitbucket/redacted/redacted-grpc/src/redactedGrpcServer/redacted.redacted.redactedGrpcServer.csproj" -IncludeReferencedProjects -Properties "Version=1.0.0;Configuration=Debug;Description=redactedGrpcServer Artifact" -Exclude *.x64.*;*.x86.* Attempting to build package from 'redacted.redacted.redactedGrpcServer.csproj'. MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin'. Packing files from 'C:\bitbucket\redacted\redacted-grpc\src\redactedGrpcServer\bin\Debug'. Using 'redacted.redacted.redactedGrpcServer.nuspec' for metadata. Found packages.config. Using packages listed as dependencies Successfully created package 'C:\bitbucket\redacted\redacted-grpc\nuget\redacted.redacted.redactedGrpcServer.1.0.0.nupkg'. Finished executing task: Build
Task Duration
Clean 00:00:00.0209161
Restore-NuGet-Packages 00:00:01.7008201
Build 00:00:05.3842408Total: 00:00:07.1059770
The problem here once again lies with build.ps1 like issue #74. If you were to pass your arguments directly to cake it would probably work.
Supposing that we only have to fix arguments in the format -name=value, we could add something like this to the bottom of build.ps1 (around line 243):
If ($ScriptArgs) {
$Args = ($ScriptArgs).split(" ")
$ScriptArgs = ""
foreach ($element in $Args) {
$elementParts = ($element).split("=")
If ($elementParts.Length -eq 2) {
$ScriptArgs += $elementParts[0] + "=`"" + $elementParts[1] + "`" "
}
else {
$ScriptArgs += $element + " "
}
}
}
This would also cover #73
The problem here once again lies with build.ps1 like issue #74. If you were to pass your arguments directly to cake it would probably work.
I have no doubt that cake would have worked fine. build.ps1 was supposed to serve as the single-source-of-truth for build definitions on that particular project, though.
(And yeah, I'd probably try more or less exactly what you're proposing by way of fixing this.)
Tried @Roadrunner67 solution with latest build.ps1 on develop and had a few minor issues:
- If arguments are already declared surrounded by
", you'll end up with double quotes in them (""foo""). This breaks script execution. - Similarly, arguments end up being separated by double spaces (
""foo""\s\s""bar""). - There's no space between the
.cakebuild executable (a.k.a.:build.cake) and the beginning of arguments ("build.cake"-target) - looks weird, but doesn't really seem to affect invocation.
After some tweaks, this is what I ended up with:
If ($ScriptArgs) {
$Args = ($ScriptArgs) -split "\s+"
$ScriptArgs = ""
foreach ($element in $Args) {
$elementParts = ($element) -split "="
If ($elementParts.Length -eq 2) {
$ScriptArgs += $elementParts[0] + "=`"" + $elementParts[1].Trim("`"") + "`""
}
else {
$ScriptArgs += $element
}
}
}
# Build Cake arguments
$cakeArguments = ""
If ($Script) {
$cakeArguments += @("`"$Script`" ");
}
Hi @nfantone, there was an error in this commit, it shouldn't have been
# Build Cake arguments
$cakeArguments = ""
But instead
# Build an array (not a string) of Cake arguments to be joined later
$cakeArguments = @()
This was fixed in PR #80