I think it should be getenv("SolutionDir"). The $() part is to let the application know that what is contained is the name of an environment variable, but it is not part of the actual name.
Did you define that environment variable? In windows, you can open the command prompt and type "set" (no quotation marks) to see all defined env. variables. If SolutionDir is not there, then you did not properly define the macro, or the macro definition engine is storing the macro elsewhere.
I can't see the environment variable there, but doing that gives me a list of user and system environment variables I can declare from the Windows Control Panel.
What I want to do is load the directory of the current solution into a string, regardless of what box is using it.
Well, if the value is not written into the environment variables, what choice do you have??
Clearly it is not where you are looking for. So where is it? I don't know. Once you find out you can see if you can code something for it. It is impossible otherwise.
Well, I have a bunch of text files that serve as inputs to my program.
I put those in my solution directory, and am going to place my program on a different box.
Thus, I want to be able to access the current solution directory.
I don't want to have to do through the trouble of manually adding all the text files with filters in the solution explorer, so I thought this would be easier.