Run frosting commands without TaskNameAttribute #3444
-
Thanks for this awesome library! Is there a way to run commands like DotNetCorePublish, with Cake.Frosting, but without using FrostingTask and TaskNameAttribute? I want to use the commands from ICakeContext, in an existing console application, but without managing the flow of the application with cake tasks. It is possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Aliases, like There is Cake.Bridge which allows you to use functionality from Cake.Core / Cake.Common from any .NET project language. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this might interest you but you can do this using Cake.Console;
using Cake.Common.Tools.DotNetCore;
var cake = new CakeHostBuilder(args).Build();
cake.Context.DotNetCorePublish("your.csproj"); |
Beta Was this translation helpful? Give feedback.
Aliases, like
DotNetCorePublish
, are defined inCake.Common
and independent of the runner (Frosting, .NET Tool, etc).There is Cake.Bridge which allows you to use functionality from Cake.Core / Cake.Common from any .NET project language.