Skip to content

Fix usage of Cake.Recipe on Travis #60

@gep13

Description

@gep13

When running Cake.Recipe on Travis, the following error occurs:

https://travis-ci.org/cake-contrib/Cake.Plist/jobs/209156414#L1435

Compiling build script...
Error: Cake.Core.CakeException: An error occurred while executing build script.
  at Cake.Scripting.Mono.MonoScriptSession.Execute (Cake.Core.Scripting.Script script) [0x0007f] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.Core.Scripting.ScriptRunner.Run (Cake.Core.Scripting.IScriptHost host, Cake.Core.IO.FilePath scriptPath, System.Collections.Generic.IDictionary`2[TKey,TValue] arguments) [0x00314] in <78602f51bc554886aeaf7e173d0ce2e7>:0 
  at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) [0x0002d] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.CakeApplication.Run (Cake.CakeOptions options) [0x0001d] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.Program.Main () [0x000dc] in <077b4364678d402f9df8bb48e9f0a543>:0

I have been able to reproduce this error by compiling and running Cake on an Ubuntu VM, using JetBrains Rider. The issue comes down to the Cake.AppVeyor addin.

Now, some of you might be thinking, why are you using the Cake.AppVeyor addin when you are running on Travis, and this is due to the fact that you can't conditionally reference an addin, so it has to be included.

While debugging, it is the following method in the Cake.AppVeyor addin that is causing the problem:

image

Which reports the following error message:

System.Nullable [System.Int32] is not a supported constant type

The suspicion is that something in the Mono Compiler for Cake is either confused, or does not support what this method is trying to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions