Comments (3)
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.
@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.
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)
- Update Cake.Kubectl.yml
- Update Cake.Mage.yml
- Update Cake.Mastodon.yml
- Synchronize Contributors
- Update Cake.ProtobufTools.yml
- Update Cake.ResourceHacker.yml
- Update Cake.SmartAssembly.yml
- Update Cake.VsixSignTool.yml
- Update Cake.Npm.yml
- Update Cake.Flutter.yml
- Update Cake.Markdownlint.yml
- Update Cake.BuildSystems.Module.yml
- Update Cake.Issues.yml
- Update Cake.Issues.DocFx.yml
- Update Cake.Issues.EsLint.yml
- Update Cake.Issues.InspectCode.yml
- Update Cake.Issues.Markdownlint.yml
- Update Cake.Issues.MsBuild.yml
- Update Cake.Issues.PullRequests.yml
- Update Cake.Issues.Reporting.yml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.