Questions tagged [cakebuild]

Cake (C# Make) is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.

Cake is a cross-platform build automation tool built on top of Roslyn and the Mono Compiler which uses C# as the scripting language. Cake is open source and the source code is hosted on GitHub.

Cake is available on Windows, Linux and macOS.

294 questions
5
votes
1 answer

Passing string[] from batch file (which contains double quotes ") to powershell script

I have a powershell script which has a string[] parameter and try to pass value to this from batch file PowerShell Script [string[]]$ScriptArgs Batch File powershell -File Foobar.ps1 -ScriptArgs -versn="""1.0.0.0""",pattern="""FooBar.*""" (3…
Nikhil Agrawal
  • 47,018
  • 22
  • 121
  • 208
5
votes
1 answer

Conditionally load .cake files

I use CAKE 0.22.0. Depending on the arguments passed into build.cake, I want to load different .cake files. E.g., if the parameter VisualStudioVersion has the value 2013, I want to load the vs2013dlls.cake file; if it has the value 2015, then I want…
M.Y. Babt
  • 2,733
  • 7
  • 27
  • 49
5
votes
1 answer

How can cake build arguments be documented?

In a cake build script there is a very neat way of documenting the tasks using the .Description() extension on the Task. These descriptions are displayed when calling the build script with the -showdescription argument. I have several custom…
Philipp Grathwohl
  • 2,726
  • 3
  • 27
  • 38
5
votes
1 answer

How To Use Nuget Packages in Cake Build Tool

build.cake: var target = Argument("target", "Default"); Task("Default") .Does(() => { var client = new RestSharp.RestClient("www.test.com"); Information("Hello World!"); }); RunTarget(target); packages.config:
Chazt3n
  • 1,641
  • 3
  • 17
  • 42
5
votes
2 answers

Exporting Cake dotnet core test output to TeamCity

I'm looking for a way to export the test output from a .NET Core application, to TeamCity via a Cake build script. Currently, I'm simply running: DotNetCoreTest("./src/MyTestProject"); But I can't see anything within the documentation of…
Nagoh
  • 813
  • 2
  • 10
  • 23
5
votes
1 answer

How to run two cake file one by one based on first cake file compilation success?

I want to run my source compilation source.cake file and then compile Build.cake file But i should not start Build.cake if source.cake file has failures.So how to pass the compilation status of soruce.cake file value to build.cake ? Is this possible…
vijay
  • 701
  • 2
  • 12
  • 26
5
votes
1 answer

TeamCity XML Report Processing not working for NUnit 3 report file

I have a CakeBuild build script which compiles a Visual Studio 2015 solution then uses the Cake add in for NUnit 3 to run the unit tests and generate the TestResult.xml file. The tests pass successfully when run locally and the report is…
Alan Low
  • 264
  • 1
  • 7
5
votes
1 answer

Issues of executing remote powershell script using cake-build

I am trying to execute following test.ps1 script param([string]$name,[string]$password); write-Output "Hello $($name) my password is $($password)"; dir c:\ New-Item c:\HRTemp\test.txt -ItemType file on remote server using following…
bumbeishvili
  • 1,342
  • 14
  • 27
5
votes
2 answers

How to create a task in c# cake build to upload file with FTP?

I noticed that cake support HTTP Operations, but no FTP Operations, do you know how to create a task to upload file via FTP?
user1633272
  • 2,007
  • 5
  • 25
  • 48
5
votes
1 answer

Breaking change in GetFiles with 0.15.2 can't exclude folders

I can't remember where but found an example how to exclude folder from being search. Our issue was search node_modules would cause long path exceptions. Func exclude_node_modules =…
gertjvr
  • 207
  • 1
  • 7
5
votes
1 answer

How do I fetch Cake Build prerelease addin from alternative source?

We're creating an internal use Cake addin for our build scripts. We're currently publishing it as pre-release to an internal feed, we've previously consumed addins from NuGet with #addin [id] syntax like this: #addin "Cake.FileHelpers" Is it…
user6669830
5
votes
2 answers

Cake Build set full version with DotNetCoreBuild alias

I'm using the ParseReleaseNotes alias in Cake to manage my versioning, worked fine with a project where I patch the assembly info with CreateAssemblyInfo alias. Now with project not using csproj but project.json I want to achieve the same and…
user6671157
5
votes
1 answer

What's bare minimum example of and Cake script Alias / Addin?

I'm looking at Creating my own addin for Cake to extend the DSL, documentation's a bit lacking. What's the bare minimum needed for creating an Cake addin script alias?
user6669830
5
votes
1 answer

How can I copy the content of ASP.NET project when building with MSBuild?

I am working on writing some new build scripts for a few of our applications, the current scripts build all projects in place with MSBuild and then manually copy all of the content (views, scripts, etc...) and the bin folder manually to an artifacts…
user1618236
4
votes
2 answers

How do I escape quotes in an msdeploy post sync command that is executing a powershell script?

I am attempting to setup a Cake task that will use MsDeploy to sync a powershell script to a remote server and then execute that script as a post sync command. The problem I'm facing is finding a combination of quotes and escapes within the cake…
user1618236
1 2
3
19 20