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
4
votes
0 answers

Cake Build- How to solve that "MSBUILD : error MSB1009: Project file does not exist."

I am using below Task and running this from VS Code. Task("Build") .Does(() => { // Use MSBuild MSBuild("E:/Repos/Code/TestService/TestWindowsService.sln", settings => settings.SetConfiguration(configuration)); …
Pancheti
  • 217
  • 1
  • 7
4
votes
1 answer

Using statement in Cake

I am trying to use a using statement in Cake so that I can use the Regex class. The line where I am trying to use this: var matchesFromBranch = Regex.Matches(gitBranch, jiraPattern, RegexOptions.IgnoreCase).Select(m => m.Value).Distinct(); This…
Sam Debruyn
  • 928
  • 1
  • 8
  • 22
4
votes
1 answer

Cake command DotNetCoreTool fails with "No executable found matching command" on build server

I'm trying to generate a DotNetCore AWS Lambda package on our build server using a Cake Build script: Task("PackageLambda") .Does(() => { var projectDirectory = System.IO.Path.Combine(baseDirectory, lambdaProject.BaseDirectory,…
brianfeucht
  • 774
  • 8
  • 21
4
votes
3 answers

Cake Build auto merge functionality

I'm using cakebuid as my build tool for TFS 2017 Update 2 and trying to implement the traditional Git Flow. In this flow, there are a few automatic merges that happen every time changes get into master, those changes need to be propagated to the…
Miguel
  • 3,786
  • 2
  • 19
  • 32
4
votes
1 answer

Cake enabling Parallel MSBuild

In a cake file, how do I "enable parallel build" on MsBuild actions. I get the message output to the terminal to "please add the "/m" switch", but I don't see how to do this in the MS Build Settings that I pass into the MsBuild method.
Colin Mackay
  • 18,736
  • 7
  • 61
  • 88
4
votes
1 answer

Install Nuget Package from Network Drive with Cake

We have some nuget packages on a network drive that I'd like to be able to reference in my Cake script. The absolute path to the drive looks something like this: \\MyDrive\NuGet\Packages\mypackage.nupkg Is there any way to reference this package…
Ryan
  • 105
  • 1
  • 1
  • 5
4
votes
1 answer

Getting directory listing in Cake build script

Is there a simple method for getting a directory listing (e.g., DirectoryPathCollection) for a given directory path? I'd like to be able to get all directories easily for the current directory as well as from a given path. I'm not seeing anything…
patridge
  • 26,385
  • 18
  • 89
  • 135
4
votes
1 answer

Build all solutions within a tree using Cake (C# make)?

I have multiple VS solutions within the same directory tree and would like to build all of them using Cake. Is there a way to build all of them without putting them one by one into the build script? Thanks for any ideas
4
votes
1 answer

Using CakeBuild XMLPoke change inner text value of node

I'm having trouble figuring out how I can change the inner text value of an XML node using XmlPoke in Cake. The error I keep getting is Error: Expression must evaluate to a node-set. My XML looks like this
Stephen Gilboy
  • 5,572
  • 2
  • 30
  • 36
4
votes
2 answers

Need to get the details of the modified files in GitPull method in cake script

Hi I am using GitPull method to pull the changes into Repository. Referred from below link http://cakebuild.net/api/Cake.Git/GitAliases/CC1AE32F I need to get the log of updated files while performing GitPull method. Is there any way to get those…
Jeeva S
  • 75
  • 6
4
votes
1 answer

Hide services passwords in Cake Build

I am using Cake build to build and deploy a project but in my script I have a few services passwords which I do not want to expose. Is it possible to read the passwords from an external file (maybe JSON?) which I would not push to Github? So this…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
4
votes
1 answer

Log the warning messages in a text file from a cake script

I'm using the below cake script to compile my C# project. There are few warning messages shown in PowerShell while executing the script. I like to log the warnings in a text file which is in a physical location(ex: D:\WarningReport.txt). The below…
IMK
  • 654
  • 9
  • 15
4
votes
0 answers

How to make the wix file compilation success using wix toolset nuget package?

Am new to C# cake build. I need to create a WiX installer using WiX nuget package. I have included the WiX nuget package in my cake script. Packages downloaded properly. But, WiX file getting error that some WiX related files were not referred…
test test
  • 41
  • 2
4
votes
1 answer

How can I make OpenCover return an error when there is a failing test in the Test Runner?

When using the following Cake Script: Task("Test-xUnit") .WithCriteria(() => DirectoryExists(parameters.Paths.Directories.PublishedxUnitTests)) .Does(() => { EnsureDirectoryExists(parameters.Paths.Directories.xUnitTestResults); …
Gary Ewan Park
  • 17,610
  • 5
  • 42
  • 60
4
votes
1 answer

How to display build error messages in TeamCity when using cake build scripts

Having a CI pipeline that is using Teamcity and Octopus deploy and build scripts written with Cake I want to be able to display the error messages that generated by the build script. Now the message displayed is: Exit code 1 (new) In order to be…