I'm trying to use the environment variable USERNAME in a Visual Studio 2005 project, but it doesn't seem to work.
In a lone command prompt, USERNAME equates to my user name - i.e. "spfolly"
In a Visual Studio 2005 Command Prompt (from the Tools menu), and during a (C++) build, USERNAME equates to " (1 user licence)"
How rude of VS to overwrite my USERNAME environment variable! So, given this situation, what's the b开发者_开发百科est way to find the current username during a build?
Thanks.
Steve
Doh! Well, I could have deleted the question but I thought I'd leave it here to help others if needed...
It appears that the Visual Lint plug-in (version 1.5.5.69) is the culprit. I uninstalled Visual Link and now USERNAME works as expected.
I realise it's quite an old version; I don't know if the latest version of Visual Lint fixes this problem.
精彩评论