TeamCity linking issue with mspdb80.dll
===

I kind of have a good idea of whats going on, just no idea how to fix it. We are using TeamCity 6.5 to build a platform builder 6.0 project via command line script. The problem we are running into is with multiple visual studios installed.

Team City doesn't seem to be aware of which Visual Studio to use in its path.


    LINK : fatal error LNK1101: incorrect MSPDB80.DLL version; recheck installation of this product


What I think is happening is its starting the mspdbserver for visual studio 2010 instead of 2005 and failing during the sysgen. The strange part is this problem only exists running from team city, if we manually invoke our .bat file from a command prompt it works fine. So our SetEnv.bat that gets generated and run might be setting up an environment but again, TeamCity doesn't get the new environment variables or something. 

Any help would be great!
Thanks
