Skip to content

Cake Frosting Tasks in Library #3812

Discussion options

You must be logged in to vote

This is possible. See Cake.Frosting.Issues.Recipe for source code of a recipe package which provides some tasks for Frosting builds.

To make tasks of such a library available to your Cake Frosting build you need to register them by adding the following line to the bootstrapping code in the Main method of your Cake Frosting project:

using System;
using System.Reflection;
using Cake.Frosting;
using MyFrostingLibrary;

public static class Program
{
    public static int Main(string[] args)
    {
        return new CakeHost()
            .UseContext<BuildContext>()
            .AddAssembly(Assembly.GetAssembly(typeof(MyTask)))
            .Run(args);
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@james-a-morgan
Comment options

Answer selected by james-a-morgan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants