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.

261 questions
23
votes
1 answer

How to enable diagnostic verbosity for Cake

I am having some problems running my build.cake file, but I can't immediately see what the problem is. Is there a way to enable diagnostic verbosity, so I can get more information about what is going on, and how to fix the problem?
Zardaloop
  • 1,418
  • 4
  • 20
  • 39
11
votes
2 answers

How to use Cake.net with Gitlab CI?

I have an ASP.NET MVC application. I am trying to implement CI and CD using Gitlab and Cake.net. In order to test more easily, I installed Gitlab CI multi runner on my machine. I registered it with 'shell' as executor. I am trying to execute the…
Marius Stănescu
  • 2,896
  • 2
  • 30
  • 40
11
votes
2 answers

How to update only version info in assemblyinfo.cs using cake?

I am very new to cakebuild. I want to update the version info of assemblyinfo.cs using cakebuild. public static void CreateAssemblyInfo() method overwrites the entire content of the assemblyinfo file. But I need just version info to be updated. How…
shobha aradhya
  • 121
  • 1
  • 3
11
votes
1 answer

How do we authenticate against a secured NuGet server with Cake build?

We are working on automating our builds using Cake Build and we use NuGet packages from nuget.org but we also have our own NuGet Feed server which has a username/password authentication to access. How do we utilize Cake Build with a custom NuGet…
Ensunder
  • 283
  • 1
  • 3
  • 8
11
votes
2 answers

Passing MSBuild Arguments to Cake Build Script to produce _PublishedWebsites

I am currentlly in the process of writing a Cake build script to build a number of ASP.NET MVC sites. At the moment I am unable to see an option to pass arguments to MSBuild to produce the _PublishedWebsites folder for deployment. I believe the…
SouthernDev
  • 113
  • 1
  • 5
10
votes
2 answers

How do I pass my own custom arguments to build.ps1?

I tried build.ps1 -SettingsProfile "Customer", but it outputs More than one build script specified. In my Cake script I fetch via Argument("SettingsProfile", "Default") And if I skip the argument to build.ps1 then it'll work, but obviously becomes…
user6671157
9
votes
1 answer

How to perform Health check in a docker console app

I have a .net 2.2 core console app that is running permanently as a HostedService in a docker container. It is not using ASPNet.Core and it's not an API, it's a pure .net-core application. When started, it performs a number of healthchecks and when…
Nick
  • 2,745
  • 1
  • 27
  • 53
9
votes
3 answers

Why does NuGetPack respond with "Cannot create a package that has no dependencies nor content"

I am trying to use the following Cake script: Task("Create-NuGet-Packages") .IsDependentOn("Build") .WithCriteria(() =>DirectoryExists(parameters.Paths.Directories.NugetNuspecDirectory)) .Does(() => { var nuspecFiles =…
Gary Ewan Park
  • 13,805
  • 4
  • 29
  • 53
9
votes
2 answers

Cake NuGetPack Configuration

I'm trying to create a NuGet package using a Cake script: var configuration = Argument("configuration", "Release"); var binDir = Directory("./bin") ; var nugetPackageDir = Directory("./artifacts"); var nugetFilePaths =…
Daniel Matac
  • 292
  • 1
  • 11
8
votes
1 answer

Can I get a reference to the current `ICakeContext` in my Cake build script?

I'm refactoring a Cake build script, and decided to introduce a class to hold some build settings that get passed around a lot and/or that exist in the global scope. Some of the settings come from arguments, and are set using the Argument(string…
Michiel van Oosterhout
  • 22,190
  • 14
  • 84
  • 123
8
votes
1 answer

CAKE build and NUNIT3 generating empty results file

I'm using cake build and trying to upload the cake unit test results to AppVeyor, but Cake/Nunit3 are generating empty results when I run locally and I assume that is what is causing my errors on AppVeyor. In the below block, NUnitResults.xml is…
Richthofen
  • 2,005
  • 17
  • 35
7
votes
3 answers

Can the load directive in CAKE be used on an optional file?

In a cake script, when using the load directive (#load) can this be optional? If the referenced file does not exist I don't want the CAKE script to return an exception. The documentation references the use of a '?' to make it attempt to load, but…
Chris
  • 181
  • 1
  • 9
6
votes
1 answer

Cake PeekXml does not "ignore" namespace

Is it a bug or per design that xmlns attribute is not ignored? (cake version 0.33.0) With an Xml like so (a too simplified nuspec file):
LosManos
  • 6,117
  • 5
  • 44
  • 81
6
votes
2 answers

TeamCity - Building dotnet core web api project using cake script

Running Cake Build script on my local machine works fine but when same script is run on TeamCity, the following error appears: Nuspec file does not exist in package. Any idea what could have caused this error?
nasiroudin
  • 327
  • 3
  • 13
6
votes
1 answer

Is it possible to call powershell command from within Cake task

I'm switching from Psake build tool to Cake (https://cakebuild.net/). I'm creating a scripts for quite big solution (30+ projects) with (currently) 9 different deploys. In Psake it was trivial to call PowerShell commands, since entire script has…
Martin Trampus
  • 123
  • 1
  • 9
1
2 3
17 18