I am building on both Win10 & Win7 x64 environments on multiple real & virtual boxes - I had same issue on v2017.1, 2017.2beta, and even after backlevelling to 5.6.2p4.
I could initially build a facebook target .exe, but any subsequent attempt to build for other targets had numerous facebook & gameroom.dll registration errors preventing build completion.
Even after deleting facebook SDK, reimports kept recreating the SDK folders.
Completely deleting the Unity program installation subdirectory \Editor\Data\PlaybackEngines\Facebook, let me build for standalone again, but still some issues remained.
I was only able to work around it by having two completely separate Unity installations, one WITH facebook build support, and one without.
I had to use a Version Control System like SVN to commit my original assets & related data from the original project subdirectories, and check them out to a new separate subdirectory for use with the other Unity installation.
Now the initial error as mentioned still appears, but it is not preventing .exe builds, and I can get the Facebook Gameroom to open and run the built .exe no probs.
Hint - if your Facebook Gameroom is not starting up, (or at least not starting with your built .exe),
first check that Facebook Gameroom starts and shuts down ok in Windows outside of Unity.
It could be caused by the automatic upgrade Facebook Gameroom does after installation, which sometimes leaves two conflicting versions installed (in which case, uninstall the old version and restart windows)
It could also simply be caused by Facebook Gameroom not cleanly completing its autorun at windows startup, in which case, usually a windows restart gets it working again - if not, uninstall/reinstall FBGameroom.
It is usually a good idea to start up a Facebook Gameroom window before you start Unity, to eliminate that as a factor when doing your facebook target build.
Finally, if FBGameroom is starting ok, but Unity is not kicking off a successfully built FB target .exe inside FBGameroom, you should have the option within your Facebook Gameroom account dropdown menu, to run a [DEV] Debug Local Unity Game build, which either opens a file choice dialog for you to pick the built .exe, or it takes the most recent chosen built .exe and run it.
As of today, I find that the security patch for Unity means yet another mass download of a new version which I’ll have to roll out over all my multiple build machines, real & virtual 