“sgen.exe” exited with code 1

What? I moved my project to my development server and wanted to build for production and this error came up.

What is sgen.exe anyway? I found the answer on msdn: “The XML Serializer Generator creates an XML serialization assembly for types in a specified assembly in order to improve the startup performance of a XmlSerializer when it serializes or deserializes objects of the specified types.”

Hmm… I’m not sure my assembly will be XML serialized. Ever. Then what can I do about it?

Apparently there is a bug in the Visual Studio 2005 for some assemblies when building in release mode. The solution is to disable the generation of the serialization assembly:

  • Open the project properties
  • Go to the “build” tab
  • Find the “Generate serialization assembly” drop-down and choose “Off”

This solved the problem.

Fix to "sgen.exe" exited with code 1 problem

sgen.exe exited with code 1 fix: disable it :-)

About briancaos

Developer at Pentia A/S since 2003. Have developed Web Applications using Sitecore Since Sitecore 4.1.
This entry was posted in General .NET and tagged , . Bookmark the permalink.

One Response to “sgen.exe” exited with code 1

  1. Pingback: sgen.exe exited with code 1 « Point Deep

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s