Skip to content

How to build the MAUI project using Cake plugin? #3384

Answered by devlead
KanniyappanP asked this question in Q&A
Discussion options

You must be logged in to vote

For building Maui app I would recomend using the .NET CLI instead of MSBuild

A script could look something like this

public record BuildData(
    string Configuration,
    FilePath Solution
    );

Setup(
    context => new BuildData(
        "Release",
        "./MauiApp1.sln"
        )
);

Task("Clean")
    .Does<BuildData>((context, data) => {
    CleanDirectories("./src/**/bin/" + data.Configuration);
    CleanDirectories("./src/**/obj");
});


Task("Restore")
    .IsDependentOn("Clean")
    .Does<BuildData>((context, data) => DotNetCoreRestore(data.Solution.FullPath));

Task("Build")
    .IsDependentOn("Restore")
    .Does<BuildData>((context, data) => DotNetCoreBuild(
        data.S…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nils-a
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants