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.
276
questions
0
votes
1
answer
16
views
How to capture a Cake build failure within an Azure DevOps task?
For the reasons that are beyond the scope of this discussion, I have the following Azure DevOps setup which is being used to build some .NET library:
An Azure DevOps Powershell task:
- task: ...
0
votes
0
answers
43
views
Can .NET Cake be used to build projects in Debug configurations, rather than Release?
Referenced this SO question first, to no avail - Use Cake to build .Net Core project using Debug configuration
Also checked out the Cake docs, as well as their github, these two pages looking ...
0
votes
1
answer
226
views
Cake Addins install fail error during build
I am using net 4.8 framework. and cake version 0.38.2.
During build in Teamcity, it has to install addins cake.npm, cake.filehelpers. But following error happens
Could not find any assemblies ...
0
votes
1
answer
41
views
Cake script works locally, but fails on docker env - error CS0117
I have added few lines to working cake build script. It executes properly on my local machine, but when trying to implement it on docker, where it worked fine till now - it gives me error:
error ...
1
vote
1
answer
79
views
The Cake GetVersion - Duplicate 'AssemblyInformationalVersion' attribute
For some reason, there is an error during cakebuild.net task execution.
The root cause of error is UpdateAssemblyInfo = true property. It's look like attribute duplication happens.
But it's not ...
0
votes
2
answers
78
views
Need help for Checkmarx.Api cake plugin
I am trying to incorporate "Checkmarx" Static code scans as a stage into my devops pipeline. Currently our code uses "cake" files to excute the stages (invoked by PowerShell).
I ...
0
votes
1
answer
39
views
Does cake have support for windows impersonation
I need to use cake to install an application, and I need it to run as the user that later will run the application. Is this possible with cake in windows, by impersonation this user?
0
votes
1
answer
46
views
Exists a way to configure cake so it uses inside DotNetCorePublishSettings the switch self contained
MSBuild has a switch "--self-contained" what publishes also the used .NET framework. So cake has a Function "DotNetCorePublish". Exists any way to set up that function so it ...
0
votes
1
answer
43
views
Cake -> AdbInstall -> Object reference not set to an instance of an object
How can I use cake ADB in the right way?
My laptop -> Mackbook M1
#addin "nuget:?package=Cake.Xamarin&version=3.0.2"
#addin "nuget:?package=Cake.Android.Adb&version=3.2.0&...
0
votes
1
answer
40
views
How can you conditionally set services in the docker-compose.yml file?
I'm new to using Docker and Cake. At the moment we have a simple Cake task that runs the DockerComposeUp() method that takes a DockerComposeUpSettings object. The docker-compose.yaml file holds some ...
3
votes
1
answer
48
views
How to addin specific package if cake running in windows
ITNOA
I have cake file that I want to run in Windows and Ubuntu.
In Windows we need Cake.EntityFramework addin and in Ubuntu we do not need it.
So I want to write some platform specific addin like ...
0
votes
1
answer
208
views
How to specify Cake.Tool version on yaml task in Azure devops pipelines
I have this yaml task to run a build.cake file.
- task: cake-build.cake.cake-build-task.Cake@2
displayName: 'Build Sources'
inputs:
script: devops/build.cake
target: Default
verbosity: ...
0
votes
2
answers
150
views
How to pass command line arguments to Cake (Frosting), when these arguments are already collected with System.CommandLine?
I'm developing a .net tool for building our projects. I'm using System.CommandLine package for collect command line argument without sweat. My build command looks like this:
[Command(Description = ...
1
vote
1
answer
112
views
Xamarin iOS: error MSB4018: The "CompileITunesMetadata" task failed unexpectedly
After updating our iOS build server from Mac OS Catalina to Big Sur our GitLab pipelines (running cakebuild) are failing with some cryptic Xamarin specific error message for one specific project (...
0
votes
0
answers
29
views
Set scoped npm registries with cake script
I have a scoped myget package "@test/test-lib" in the package.json and I want to add a private myget url in the npm registry so that npm i installs package through the cake script.
I tried ...
0
votes
1
answer
205
views
Run DotCover dotnet test with Cake
Currently I run DotCover for each text project in my solution.
I want to change this to only run DotCover once for the whole solution.
I found this command which works:
C:\_git\MyApp\build\tools\...
1
vote
2
answers
1k
views
Cake NuGetRestore Could not locate nuget.exe
I have created simple .NET5 console application which can be successfully run using "dotnet restore" and "dotnet run". Application is using one package Newtonsoft.Json.
I want to ...
0
votes
1
answer
129
views
Push commit to Azure Repo using Cake Build (C# Make)
Im trying pushing changes in a project with cake. This is my code
[TaskName("GitPush")]
public sealed class GitPushTask : FrostingTask<BuildContext>
{
public override void Run(...
0
votes
1
answer
93
views
Expose MSBuild property in Cake script after build step
Can you get property set by MSBuild inside your cake script?
I currently have a target that runs after compilation to indicate whether it has run, or whether it was an incremental build.
I want to ...
1
vote
1
answer
136
views
How to install nupkg from local file which is generated after done gulp build
I want to install the below nupkg from my local machine throw powershell.
C:\ServerPublishing\build\javascript\reports\release\packages\BoldReport.Server.3.1.92.nupkg
I have tried and get the below ...
0
votes
2
answers
180
views
How To Pushing a Docker image to Azure Container Registry using Cake Building?
I need build a task on Cake building that allow my to push a docker image to Azure Container Registry. Im searching in internet but I not find how to do that... someone had the same problem?
0
votes
1
answer
196
views
Getting errors in Cake.Sonar on Cake Frosting
Im trying to use sonarqube from a Frosting cake project.
There are my tasks:
using Cake.Common;
using Cake.Common.IO;
using Cake.Common.Tools.DotNetCore;
using Cake.Common.Tools.DotNetCore.Build;
...
0
votes
2
answers
385
views
Error: One or more errors occurred. too many redirects or authentication replays
Task("Clone")
.Does(() =>
{
GitClone(@"https://gitlab.organization.com/bold-reports/javascript.git",
@"C:\ServerPublishing\build",
...
1
vote
1
answer
131
views
How to pass multiple flags as a Cake argument?
We have a number of build flags we'd like to be able to pass to our Cake script as a single argument. Based on this answer and the TypeConverter documentation, I would expect the following simplified ...
2
votes
2
answers
317
views
Cake Clean task is skipped on cake build
Brand-new Cake project, build.cake written as in Setting Up A New Project, added to a net5.0 console application.
When running dotnet cake, the task Clean is silently skipped by runner.
I ran dotnet ...
0
votes
1
answer
227
views
Cake Running Nunit 3 using DotNetCoreTest Is Failing
Task("Nunit")
.Does(() => {
DotNetCoreTest("D:\Workspace\Proj14\test\test\WebAutomation\NUnit\UserManageLMTWS.cs", );
});
Currently have by build.cake defining the task ...
2
votes
1
answer
127
views
OmniSharp hangs when loading Cake.Bakery.exe
I am new to Cake.
I am trying to configure IntelliSense for Cake VSCode as described here:
https://cakebuild.net/docs/integrations/editors/vscode/intellisense
I am getting the following OmniSharp ...
0
votes
2
answers
212
views
Access target branch name from GitHub Pull Requests in Cake
I'm working with Cake and Teamcity and I'm trying to access which branch a GitHub PR is targeting
Been trying to find a GitHub API wrapper for Cake do to the job, or a plugin/script to TeamCity to ...
0
votes
3
answers
242
views
How to find type of project with cake build system?
ITNOA
I use cake build system to automate building my solution and I want to automate testing my project with cake in our CI,
My NUnit projects have many types such as asp.net dot net framework 4.6.1 ...
3
votes
1
answer
312
views
Cake runner for .NET Framework (4.8) doesn't pick up environment variables
I'm using the Cake runner for .NET Framework to build a .NET Framework 4.8 console application. I got build.ps1 using:
Invoke-WebRequest https://cakebuild.net/download/bootstrapper/windows -OutFile ...
0
votes
2
answers
253
views
How do you pass empty arguments in Cake v1?
According to the upgrade document it is no longer possible to ./build.sh arg= as of v1.0. Indeed, that produces:
Error: Expected an option value.
However it also doesn't work with arg=''. I could ...
2
votes
1
answer
263
views
How to download nuget package without its dependencies?
Im using below code to install nuget packages in CI process,
Cake.Common.Tools.NuGet.NuGetAliases.NuGetInstall(context, packageid, new NuGetInstallSettings { NoCache = true, OutputDirectory = "../...
0
votes
1
answer
109
views
Error accessing BuildSystem.AzurePipelines in cakebuild
Within my cake script I'm trying to access the following, to check if it's running on the master branch:
var isMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master",
...
1
vote
1
answer
743
views
Running ReportGenerator using cake build on teamcity (Exec format error)
I'm trying to generate test coverage report and view on teamcity after my project build is complete. So far I have been able to make it work on my local machine (windows) without any issue. The report ...
0
votes
2
answers
555
views
How do I Install Cake.CoreCLR NuGet package to my tools folder?
Step 1 of this answer says Install Cake.CoreCLR NuGet package to your tools folder. How do I do that?
Things I've tried:
> dotnet add package Cake.CoreCLR --version 0.38.4
Could not find any ...
0
votes
1
answer
243
views
Rerun Failed Test Cases with Cake and NUnit
I am using a cake script to run test cases with NUnit. The cases are written in C#. How can I tell the script to rerun failed test cases? I am also using PowerShell to bootstrap the cake build.
0
votes
1
answer
488
views
Cake.build error : "The underlying connection was closed: An unexpected error occurred on a send"
I am facing an issue when trying to run build cake file in powershell.
The first line of build.cake file is: #addin "nuget:?package=Cake.SemVer&version=1.0.14"
The version in /tools/...
0
votes
1
answer
272
views
Writing the build.ps1 console output to a specific log file
I am using cake script to build my application. While the build process all the logging informations are displayed in the console. I want to write all the console output into a specific log file in ...
1
vote
1
answer
217
views
How can I get the filename of the entry ".cake" file?
I'm trying to set up a consistent temp folder structure for a range of builds. Each build has its own folder and git-ignored "temp" subfolder. I'd like to have the path to the ".cake&...
0
votes
1
answer
1k
views
error MSB4086: A numeric comparison was attempted on "$(MSBuildAssemblyVersion)"
I am trying to build the project inside docker by using build.ps1 and I get this error.
MSBuild auto-detection: using msbuild version '4.0' from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319'.
Cake....
0
votes
1
answer
296
views
Run gulp via cake Start-Process
I'm building site via gulp inside a windows container:
mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-1909
The container have nodejs and gulp-cli installed in it as following (in ...
0
votes
0
answers
183
views
RTI DDS Connector Compile Fails
I am trying to compile C# Connector of RTI Connext DDS.
I clone the C# Connector from this address to my computer via git.
But when I go to the \rticonnextdds-connector-cs directory via powershell ...
1
vote
1
answer
2k
views
I got an error when I'm trying to build my project using Cake
When I try to build I getting the follow error. Why Cake doesn't build my project?
What should I do? Does anyone know what need to do?
The 'addin' directive is attempting to install the 'Cake....
0
votes
2
answers
82
views
cakebuild: How to specify license in DotNetCorePack?
I try to specify the license for a nuget package in a cake script.
The following does not work - it doesn't put any license in the nuget package, and I can't find any documentation how to properly ...
1
vote
1
answer
355
views
Check for empty file and quit cakebuild
I am attempting to write a check in my Cake build script to pull in a file from BuildParameters and check if the file contents are empty -- if contents are empty, throw an exception and quit the build....
2
votes
1
answer
216
views
How to execute t4 template using the Cake script
What is the API / Syntax to execute the T4 template using the Cake build? Any example code will be helpful.
Whether StartProcess API should be used to call the texttransform.exe or is there any other ...
1
vote
1
answer
599
views
Configuring Environment Variables to resolve version mismatch while running cake script
I am new to the cake script.
I am trying to run an existing cake script that is already developed.
It is throwing following an error.
Cake.exe : Error: The assembly 'MagicChunks.Cake, Version=1.0.0....
1
vote
1
answer
770
views
Cake on OSX fails with "error: the assembly name is invalid"
I tried to use cake for the first time today and got the error above. I was initially using the cake package from homebrew, but to simplify the problem I downloaded the cake example project (https://...
1
vote
1
answer
127
views
Purpose of the file packages.config.md5sum
I have searched along the lines of "purpose of packages.config.md5sum" and most help articles tell me about packages.config, which I am already familiar with.
I have a Cake + NUnit build script that ...
1
vote
1
answer
670
views
Pass multiple parameters/arguments to target
I've got a target Release-Prepare taking the version as an argument:
var version = Argument("version", "1.0.0.0");
Task ("Release-Prepare")
.Does (() => {
// Compute the package ...