visual-studio-2012sgen

"sgen.exe" exited with code -532462766


Good day,

I am attempting to build my project in Release mode, but keep getting the error as stated in the title. What causes this and how can I prevent or fix it?

The other answers I saw on stackoverflow, like this one, made no sense to me.

sgen fail


Solution

  • I learned that sgen.exe is an XML Serializer Generator Tool. The error also occurred during the build with Release configuration.

    Probably a dirty fix, but I viewed the output window to determine which project was throwing this error. After finding which project caused this, I immediately opened that project's properties, went to the build tab, and deactivated "Generate serialization assembly"

    fix

    Rebuilt my project - it worked.