Code Monkey home page Code Monkey logo

Comments (3)

devlead avatar devlead commented on June 6, 2024

You can't pass a globber pattern directly to the MSBuild alias, but Cake does indeed have globbing support via the GetFiles aliases, so what you can do is something like below:

    var projects  = GetFiles("./**/*.csproj");
    // Build all solutions.
    foreach(var project in projects)
    {
        Information("Building {0}", solution);
        MSBuild(project, settings =>
            settings.SetPlatformTarget(PlatformTarget.MSIL)
                .WithProperty("TreatWarningsAsErrors","true")
                .WithTarget("Build")
                .SetConfiguration(configuration));
    }

You can include/exclude by combining two GetFiles together like below using - or + operator:

var projects  = GetFiles("./**/*.csproj") - GetFiles("./**/*Common*.csproj");

from website.

gep13 avatar gep13 commented on June 6, 2024

@Sahilkhan99 for future reference, the issues list here on this repo is really intended for issues/problems/questions with that Cake website at http://cakebuild.net/. Your question would have been better suited over on the Cake repo here https://github.com/cake-build/cake, or as a question on our Gitter chat room here: https://gitter.im/cake-build/cake, or as a question tagged with cakebuild on StackOverflow: http://stackoverflow.com/questions/tagged/cakebuild.

Out of interest, so that we can improve our messaging, what was it that brought you to this repo to ask your question?

Thanks for reaching out though, hope you are enjoying using Cake, and that @devlead answer above helps you out.

from website.

khanzzirfan avatar khanzzirfan commented on June 6, 2024

Hi @devlead , Thank you for the answer. very helpful. I'll create a PR with this example so that other people can benefit from your answer.

@gep13, thank you for guiding me. I completely agree and I have chosen the wrong repo to ask this question. I clearly did not see there are 2 repos (website and cake). When I went on to the http://cakebuild.net/docs/tutorials/getting-started, I saw the edit on repo link and I thought was only available repo for cake.

I'll make sure next i'll ask more relevant question with specific repository.

Thank you.

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.