Managing multiple Custom library revisions Visual Studio 2019

7 Views Asked by At

Given two directories "D:/CustomLibRevA" and "D:/CustomLibRevB" which contain:
*.h
*.lib
*.exp
*.dll

We currently hardcode the $PATH setting for runtime code, and manually insert a properties sheet per user account that points to D:/CustomLibRevA, for say "devA_account" and set to D:/CustomLibRevB for say "devB_account" and we have RevA deployed in production and we are testing devB.

At some point we will need an account which can switch quickly between revA/revB we know how to generate a scropt that modifies %PATH% programmaticly, but creating a script that could do this for say the "devA_account" is less straightforward.

Before I dive in and create such a script, I thought I would ask...
A) Hasn't this problem been solved already?
Are we approaching this issue incorrectly?
I can imagine a conditional properties sheet with a token that switches from A to B.
But this makes the properties sheet more complex.
B) Is there a script out there used by other VS2019 developers that does this exact thing?

We support a composed of primarily Visual Studio 6.0 developers, and any small hint of DLL hell creates a large number of support questions.
One additional complexity is that our build can trigger execution of the developers code that is built, so the VS2019 shell %PATH% or EXECUTION_DIR is an important component in addition to INCLUDE_DIR and LIBRARIES_DIR that we place in the properties sheet.

So to summarize:
We need to change
INCLUDE_DIR
LIBRARIES_DIR
EXECUTION_DIR
and %PATH% (windows environment variable)
Between D:/CustomLibA and D:/CustomLibB in a sane manner.

Currently attempting to teach developers how all these components work, is an uphill battle.

0

There are 0 best solutions below