I have a Visual Studio solution with projects A, B, and C.
A and B are indpendant and should do some task T every time they are build. Project C is denendant to A, B and when C is built, task T should be done as well. For any case it's needed task T to be done once.
First approach:
I tried to trigger task T as pre-build event on projects A and B. That doesn't work when I build C because then A and B are build in parallel and two instances of task T is run in parallel and disturb each other.
Second approach:
I want to create new project D that will do pre-build event T. It will not have C++ or C# sources, just one script to perform T. Both A and B will be dependant to D. This solves the issue with paralelism but has other problems with Visual studio logic.
- Visual Studio will build
Donly when it is outdated but I need it to be run always? Is it possible? - When project
Dis built it should not makeAandBoutdated.
Can you help to resolve these issues with Second approach or maybe there is better solution?
My colleague suggested to add this to vsxproj file:
It is path to a nonexisting file
a.txt. Now it is built every time