My Visual Studio 2015 uses "sgen.exe".

I didn't find it anywhere in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"

Where is it taken from?

I need to know this because Visual Studio doesn't reveal details of "SGEN exited with code 1" error. I'd like see these details in order to know the real reason of SGEN error.

My boss suggested me to run SGEN manually, because in this case SGEN has some output, for example, "... Cannot deserialize type 'TypeName' because...". And this output is exactly what i need.


PS: Moving this question from SO due to comment: "This is not really a programming question since you could just as easily ask the same question about msword.exe - searching your hard disk for a file should probably be asked over at SuperUser."


Indeed, the answer is straightforward after searching the hard disk.

It depends on project .Net version.

  • .Net 4.6.1: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools
  • .Net 4.6: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools
  • .Net 4.5.1: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
  • .Net 4.0: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
  • Lower versions: look other folders in Program Files (x86)\Microsoft SDKs\Windows one.

This helped me debugging, and, therefore, programming. So, probably, this question is related to programming somehow. However, due to the fact of receiving downvotes, moved the question and the answer to Super User.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.