Tuesday, March 24, 2015

[SOLVED] fatal error C1902: Program database manager mismatch; please check your installation

I was running the Visual Studio compiler by ssh'ing into a cygwin SSH server running on windows and running "cmd /c msbuild" which gave me this error:
fatal error C1902: Program database manager mismatch; please check your installation
But strangely, if I connected over RDP and ran exactly the same command in a windows shell...it worked. This email led me to the solution so I'm giving it a signalboost. It turns out that if you authenticate to the SSH server with a key you run as a different user and in a login environment that somehow messes up the visual studio build process. You can see the difference by running whoami as below.

If you authenticated with a password you should see a proper username (in this case vagrant):
$ /cygdrive/c/WINDOWS/system32/whoami.exe
build-pc\vagrant
But if you authenticate with a key, you'll see something like this:
$ /cygdrive/c/WINDOWS/system32/whoami.exe
grr-build-pc\cyg_server

No comments: