Change Users Variables using compiler directive?
How can I change a user variable like $(Test) via code, using a compiler directive or via project options?
I have defined this variable that sometimes points to a trunk svn source code and sometimes it points to a tag svn source. I use this var in Library Path. When I open the trunk project i need the var to be set to the trunk svn source and when i open the tag svn project i need the var to be set to the tag svn. Both projects in the trunk and tag are the sam开发者_运维技巧e, but the trunk has some modifications (it is the code i am working at and it is not ready to be used yet).
I do not want to go to the Tools options to set it every time i change projects.
EDIT:
I know I could use the project source path instead of the library path, but I need all sources to be on library path so I can easily debug a project that is using my framework.
I'd probably create two batch files. Each would first set the Test
environmental variable to the necessary value, then start the IDE.
And then every time I needed to work with a different set of svn source files I'd have to (re)start the IDE through the appropriate batch file.
The direct answer to the question is: That is not possible!
But may be this is a solution to the problem: You can have special build configurations to handle your specific request. Perhaps you can use an optionset on an existing build configuration to establish the correct pathes.
精彩评论