On my machine, I found that the correct version is called C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.0A \ bin \ sgen.exe , but the target DLL is incorrect.
The reason for this, I think, is because of my sgen.exe.config, deleting the following lines helped fix my problem.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup>
source share