How can I use Multiple Build Contexts? (Frosting) #4125
Unanswered
EdLichtman
asked this question in
Q&A
Replies: 1 comment
-
Or, alternatively, if I'm not supposed to be using contexts in that way, could someone try to explain how we're supposed to use a context, and what, generally speaking is the benefit of overriding it rather than just using the built-in IFrostingContext that gets passed around? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to be able to add more than one command per Frosting Project. I'm trying to build tooling for my organization to replace our Nant build files as we're moving to Microservices. I don't want to have 300 different projects out there, one for each command that has different input arguments, some of which are required for specific tasks.
So therefore, I'd like a "ServicesContext" or a "PublishContext" or a "LocalizationIntegrationContext".
I see no way to add multiple contexts, as UseContext says "only the last context is registered".
I made a workaround in which I scrape the incoming arguments for the last Build Target command, and then I check it against all the tasks I have, and if it matches that task name, then I generically invoke the UseContext method.
However, this results in a warning show up.
As I add more and more tasks, and more and more contexts, these warnings will start to flood the tooling.
Is there a way to make the warnings stop? Is there a way around what I'm looking to do, in that I'd like to use Multiple Build Contexts?
Beta Was this translation helpful? Give feedback.
All reactions