Search code examples
c#roslyncakebuild

Cake -Experimental Switch Compile Error


I am trying to use the Cake-Plist addin and received an error that dynamic is not yet implemented in the version of Roslyn that was being used. Then from advise for someone else I was told to try the -Experimental switch. When using the switch I am receiving the following error when it is trying to compile the build script.

Error: Microsoft.CodeAnalysis.Scripting.CompilationErrorException: (2,1): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'
    at Microsoft.CodeAnalysis.Scripting.Script.CompilationError(DiagnosticBag diagnostics)
    at Microsoft.CodeAnalysis.Scripting.Script.GetExecutor(CancellationToken cancellationToken)
    at Microsoft.CodeAnalysis.Scripting.Script.Run(Object globals)
    at Microsoft.CodeAnalysis.Scripting.Script.Run(Object globals)
    at Cake.Scripting.Roslyn.Nightly.DefaultRoslynNightlyScriptSession.Execute(Script script)
    at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
    at Cake.Commands.BuildCommand.Execute(CakeOptions options)
    at Cake.CakeApplication.Run(CakeOptions options)
    at Cake.Program.Main()

Does anyone know what is causing this error?


Solution

  • A reference needs to be added to Microsoft.CSharp.dll.

    #reference "Microsoft.CSharp.dll"
    

    https://gitter.im/cake-build/cake?at=57add5a3364ad7fc5acdb660