Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:09
    baajarmeh starred cake-build/cake
  • Sep 28 22:18
    FrankRay78 commented #3280
  • Sep 28 22:04
    FrankRay78 commented #3280
  • Sep 28 21:58
    FrankRay78 commented #3280
  • Sep 28 21:57
    FrankRay78 commented #3280
  • Sep 28 21:54
    FrankRay78 commented #3280
  • Sep 28 21:49
    FrankRay78 commented #3280
  • Sep 28 21:42
    FrankRay78 commented #3280
  • Sep 28 16:56
    FrankRay78 commented #3280
  • Sep 28 16:48
    FrankRay78 commented #3280
  • Sep 28 16:35
    FrankRay78 commented #3280
  • Sep 28 16:31
    FrankRay78 commented #3280
  • Sep 28 16:27
    FrankRay78 commented #3280
  • Sep 28 10:43
    dnfadmin commented #2829
  • Sep 28 04:01
    Build #1123 passed
  • Sep 28 03:38
    Kamesh-devops commented #2788
  • Sep 28 03:37
    Kamesh-devops commented #2788
  • Sep 28 01:07
    ZaqueuCavalcante starred cake-build/cake
  • Sep 27 14:27
    Ephiiz starred cake-build/cake
  • Sep 27 04:02
    Build #1122 passed
Pascal Berger
@pascalberger
For caching in case of script runner we have an open issue: cake-build/cake#2099
Geert van Horrik
@GeertvanHorrik
Thanks for taking the time to respond. This is a very clear explanation, then (for now) I see no need to migrate everything and we can stick with the .NET runner.
But this got me thinking, there must be a way to cache the results (like in the ticket), but in source core repository. Will check that ticket.
Pascal Berger
@pascalberger
And with Frosting you can of course cache / store etc the resulting application. Which would get rid of compile time completely (but then you need to define process how it is updated, when build source changes)
catter
@catter21360439_twitter
Hey guys I have a few more questions that I am hoping some of you can help answer-
  1. Is there a way for me to run my testing build.cake file on the repo using only the commandline?
    I am seeing error that I believe are because of the way I have things setup and I want to run my branch on another platform to validate my theory. I am planning to use an Ubuntu image spun up in a docker container, but I am not set on it and am open to other ideas.
  2. Also, how is the cake/tools/dotnet-cake.exe file generated? Is that in anyway related to the changes I made in the cake-build/cake repo and I need to regenerate it when I run my test .cake file?
Mattias Karlsson
@devlead

Hi @catter21360439_twitter
Yes, Cake is a command-line tool available for .NET, .NET Core, .NET 5, and Mono.
https://cakebuild.net/docs/running-builds/runners/
So it can be executed both locally and on CI

I.e. Cake .NET Tool can be installed either globally on machine dotnet tool install -g Cake.Tool --version x.y.z, locally in repo using tool manifest as specified in Cake .NET Tool docs or to specific path using dotnet tool install --tool-path "path" Cake.Tool --version x.y.z

How Cake ends up tools/dotnet-cake.exe is either someone ran dotnet tool install --tool-path "tools" Cake.Tool --version x.y.z or had abuild.ps1 / build.sh bootsrapper putting it there.

Once you've got cake installed true manifest/globally you can invoke it through dotnet cake if you installed it to specific path, then you can on Windows invoke it path\dotnet-cake.exe or posix path/dotnet-cake.
If no script is specified then it assumes by convention build.cake otherwise just specify script as first argument to Cake.

Richard Gavel
@richardgavel
I am trying to update my add in that was referencing an older version of Cake NuGet packages (being used by a 0.25 version of Cake, roughly). When I use #r to reference the DLL directly from the bin\Debug directory of the addin build output, it works fine. However, when I package it up into a NuGet and use #addin, I just get "Failed to install addin". Even --Verbosity=Diagnostic doesn't give any useful information. It does download the nuget package, I can see it in the tools\Addins directory.
Mattias Karlsson
@devlead
@richardgavel which frameworks does the nuget target?
Richard Gavel
@richardgavel
4.7.2
Richard Gavel
@richardgavel
I'm still using the Powershell bootstrapper to the Cake.exe, not the global tool.
Mattias Karlsson
@devlead
And monikers present in nuget package?
Cake exe targets net461 and netstandard 2, maybe that's the issue
Richard Gavel
@richardgavel
Except that when I use #r and reference the DLL directly directly from my local build output directory, it works fine. Almost as if there is an issue re: NuGetPackageInstaller, but there is no logging to guide me.
But I could try also targetting net461 as well instead.
Richard Gavel
@richardgavel
It does look like targetting 461 solved the issue! Would be good to have the logging reflect this somehow.
catter
@catter21360439_twitter
image.png
Has anyone seen this before? I am running VS on windows
Mattias Karlsson
@devlead
Think gitversion changed their package in some way, pining to an older version might solve it.
I've switched to version .NET tool
Gary Ewan Park
@gep13
@catter21360439_twitter yes, I think @devlead is correct here, but it would be good to confirm. What OS are you running on, and what version of GitVersion are you trying to use?
catter
@catter21360439_twitter
@gep13 I am running Win 10 and trying to run Gitversion 5.1.2
@devlead I tried running install both with and without the --global flag, but VS output keeps saying "GitVersion.Tool is already installed, with required version." How did you link the context error to a git Tool issue?
catter
@catter21360439_twitter
@devlead I removed the gitVersion folder from inside .store and reinstalled it.
That seems to fix the issue. Thanks!
I am currently on 5.0.100-rc.2.20479.15 version of the .Net Core SDK.
Can I go any lower or do I need to be on this version? I want to see if that changes anything with my --version error for the dotnet watch command
Mattias Karlsson
@devlead
You shouldn't go lower as 5.0.100 is released now. You probably could go 3.1.404, you might already have 3.1.x installed, in that case you can add an global json file to ensure it gets picked instead.
Nick
@nick5454

anyone seen this error before ```Preparing to run build script...
Tools: /Users/runner/work/1/s/foldername/build/tools
Tools: /Users/runner/work/1/s/foldername/build/tools/Addins
Start testing Cake path.
Running build script...
& dotnet "/Users/runner/work/1/s/foldername/build/tools/Cake.CoreCLR/Cake.dll" .\foldername\build\build.cake --bootstrap
Error: An exception was thrown while activating Cake.Commands.BootstrapCommand -> Cake.Core.Scripting.Analysis.ScriptAnalyzer -> λ:Cake.Core.Scripting.Processors.Loading.ILoadDirectiveProvider[] -> Cake.NuGet.NuGetLoadDirectiveProvider -> Cake.NuGet.Install.NuGetPackageInstaller.

[debug]$LASTEXITCODE: 1

```

Tomasz Cielecki
@Cheesebaron
Hey friends. I have a question about how I set a Output variable in Azure Pipelines. AzurePipelines.Commands.SetVariable() doesn't seem to set isOutput=true
Tomasz Cielecki
@Cheesebaron
How can I work around this now regardless of Verbosity?
Nick
@nick5454
Is this a Nuget config not being found? Error: Autofac.Core.DependencyResolutionException: An exception was thrown while activating Cake.Commands.BootstrapCommand -> Cake.Core.Scripting.Analysis.ScriptAnalyzer -> λ:Cake.Core.Scripting.Processors.Loading.ILoadDirectiveProvider[] -> Cake.NuGet.NuGetLoadDirectiveProvider -> Cake.NuGet.Install.NuGetPackageInstaller. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Cake.Core.IO.IFileSystem, Cake.Core.ICakeEnvironment, Cake.NuGet.INuGetContentResolver, Cake.Core.Diagnostics.ICakeLog, Cake.Core.Configuration.ICakeConfiguration)' on type 'NuGetPackageInstaller'. ---> System.IO.FileNotFoundException: NuGet Config file not found. at Cake.NuGet.Install.NuGetPackageInstaller.GetNuGetConfigPath(ICakeEnvironment environment, ICakeConfiguration config, IFileSystem fileSystem) in C:\projects\cake\src\Cake.NuGet\Install\NuGetPackageInstaller.cs:line 338 at Cake.NuGet.Install.NuGetPackageInstaller..ctor(IFileSystem fileSystem, ICakeEnvironment environment, INuGetContentResolver contentResolver, ICakeLog log, ICakeConfiguration config) in C:\projects\cake\src\Cake.NuGet\Install\NuGetPackageInstaller.cs:line 77 at lambda_method(Closure , Object[] ) at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) --- End of inner exception stack trace --- at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) at lambda_method(Closure ) at Cake.CakeApplication.Run(CakeOptions options) in C:\projects\cake\src\Cake\CakeApplication.cs:line 45 at Cake.Program.Main() in C:\projects\cake\src\Cake\Program.cs:line 74
Tomasz Cielecki
@Cheesebaron
I've seen that before on Azure DevOps
Running NuGetAuthenticate task before seemed to fix it
Nick
@nick5454
what are you trying to do with output?
Tomasz Cielecki
@Cheesebaron
What do you mean?
Tomasz Cielecki
@Cheesebaron
Are you referring to my issue? Then... I run a cake script 3 times one time for ios, one time for android and another one for a different android platform. Instead of having to call AzurePipelines.Commands.SetVariable() with a unique variable name for each of these executions. I could do this with the same variable name, just where isOutput=true. Then I could name the 3 cake script executions and refer them like: $(ios.releaseData), $(android.releaseData) etc., instead.
Nick
@nick5454
I use a custom cake nuget and define the vars in yml then pass in SetParameters instead for multi platform builds
Tomasz Cielecki
@Cheesebaron
This is not for builds, but for deployments. I need the result from inside the cake script to be available in another task.
Stefan Ossendorf
@StefanOssendorf
Hi. Is it possible to open a browser with a specified html-file?
These two solutions somehow do not work: https://stackoverflow.com/questions/41722455/how-to-launch-html-report-from-cake-build
I get this error:
Error: One or more errors occurred. (The specified executable is not a valid application for this OS platform.) The specified executable is not a valid application for this OS platform.
The path to the html file is correct. I print that out just before the StartProcess call.
Stefan Ossendorf
@StefanOssendorf
The explicit "start cmd" apporach worked :-D
Gary Ewan Park
@gep13
@StefanOssendorf we used to do this in Cake.Recipe in the following way:
I believe for the reason you are describing
Stefan Ossendorf
@StefanOssendorf
Ah thanks :)
Nick
@nick5454
Is there a cake api I can use to install certs and provision on the azure mac host?
Nick
@nick5454
@gep13 do you know if there's a cake api that will allow me to install apple certs and provisions on the mac? I can't find one
10 replies
John Menn
@nedoziznzg_gitlab
Does any one have a workaround for this? cake-build/cake#2593
John Menn
@nedoziznzg_gitlab
image.png
John Menn
@nedoziznzg_gitlab
Can someone point me to where we are requesting for a 3.0.0 framework version, looks like bumping that up to 5 might solve this
Gary Ewan Park
@gep13
@nedoziznzg_gitlab is this an open source project that someone could take a look at?
Calvin Dallmore
@aeos
Is there a best practice for having cake return information back to the build task? For instance if I have cake execute gitversion for the package version, but I also need that information in my jenkins process, is there a defined way to do so? Apart from processing log output or writing it to file?
6 replies