Error Msb6006 Sgen.exe Exited With Code 1
MSBuild Question 0 Sign in to vote I am trying to build a project in VS 2005 but I am getting the error: Error67"sgen.exe" exited with code 1.C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets18929TAI.Util This project had been building just fine earlier today. The only thing that happened between error msb6006 cmd.exe exited with code 1 is I refreshed the web references in this project.As a test I added the same web error msb6006 cmd exe exited with code 1 visual studio 2010 references to a new project and it builds just fine. Wednesday, December 28, 2005 11:21 PM Reply | Quote Answers 0 Sign in to vote sgen.exe exited with code 9009 I seem to get the same message when I updatethe web references in the project. Removing the project from the solution and readding it seems to fix the problem. Tuesday, January 03, 2006 7:49 PM Reply | Quote All replies visual studio 2005 sgen exe exited with code 1 0 Sign in to vote Have you tried building with Detailed or Diagnostic verbosity? It seems that the error is certainly related to the generation of serialization assemblies for use with the web service. Try building with a higher verbosity and see if that reveals more information. Let us know what you find. Thanks. Faisal MohamoodProgram Manager - MSBuild Thursday, December 29, 2005 5:31 PM Reply | Quote Moderator 0 Sign in to vote Thanks for the quick response. VS does the build so I'm not sure how to change the verbosity or view the messages it produces. I don't use MSBuild directly, but knowing how to view the messages may prove useful in the future. Since myoriginal post, I managed to get the solutionto build again by removing and re-addingthe project that contains the web references. Thursday, December 29, 2005 5:39 PM Reply | Quote 0 Sign in to vote You can customize the output fromTools->OptionsThen go to Projects and Soutions and click on Build and RunThe MSBuild verbosity is the last drop down on that dialog box.Sayed Ibrahim Hashimiwww.sedodream.com Thursday, December 29, 2005 6:21 PM Reply | Quote Moderator 0 Sign in to vote Thanks. I'm still getting used to the VS 2005. I'll give it a try. Thursday, December 29, 2005 6:22 PM Reply | Quote 0 Sign in to vote Hi, I still get the same error after changing the verbosity level. Is there any other workaround. Tuesday, January 03, 2006 7:13 PM Reply | Quote Moderator 0 Sign in to vote Can you insert the relevant portions of the log here?Sayed Ibrahim Hashimiwww.sedodream.com Tuesday, January 03, 2006 7:15 PM Reply | Quote Moderator 0 Sign in to vote Error1"sgen.exe" exited with code 1.C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets18929IASTCFrameWork.Net It looks like a bug in VS 2005. Tuesday, January 03, 2006 7:47 PM Reply | Quote Moderator 0 Sign in to vote I seem to get the same message when
with code 1 Forum has moved New location: CSLA .NET forum CSLA .NET Resources: CSLA .NET forum CSLA .NET home page "sgen.exe" exited with code 1 rated by 0 users This post has 5 Replies | 3 Followers Posts 505 Reply David Wendelken Posted: Wed, Jun 28 2006 8:35 AM rated by 0 users Got this error when I compiled Csla (c#) in release mode: "sgen.exe" exited with code 1 Here's the solution I found, courtesy of http://blogs.vizibility.net/sdobrev/archive/2006/04/21/212.aspx: If you are having this problem while building your VS.NET 2005 https://social.msdn.microsoft.com/Forums/vstudio/en-US/f7f4c51f-daf6-44c5-b214-cf312b8f625f/sgenexe-exited-with-code-1?forum=msbuild project in Release mode here is the solution: Go to the project properties. Click on the build tab and set the value of the"Generate Serialization Assembly" dropdown to Off. P.S. If you wonder for what is this sgen.exe here is explanation from the msdn: "The XML Serializer Generator creates an XML serialization assembly for types in a specified assembly in order to improve the startup http://forums.lhotka.net/forums/p/494/2552.aspx performance of a XmlSerializer when it serializes or deserializes objects of the specified types." The problem went away as promised. Any reason for concern? Posts 9,475 Reply RockfordLhotka replied on Wed, Jun 28 2006 10:08 PM rated by 0 users Hmm. I don't see this error. I just rebuilt my current code (basically 2.0.2) in release mode, using VS, and see no errors in the output window or error list. The only place where serialization assemblies could/should be created would be for the web services data portal channel. There's no where else in the framework that the XmlSerializer is used or is even valuable really. Rocky Posts 505 Reply David Wendelken replied on Thu, Jun 29 2006 1:35 PM rated by 0 users Just went back and re-tested. Visual Studio 2005 Team Suite, (trial), version 8.0.50727.42 (RTM.050727-4200), running ona Virtual PC. With the project property "Generate Serialization Assembly" set to Auto or On, I get an error. From the Error List window after asking vs2005 to rebuild the project: Error1"sgen.exe" exited with code 1.Csla From the Output Window: Compile complete -- 0 errors, 0 warningsC:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\sgen.exe /assembly:Z:\csla20cs\csla20cs\Csla\obj\Release\Csla.dll /proxytypes /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v
.NET(6) Authentication(3) Codeplex(4) Excel Services(2) IIS(4) InfoPath Forms(18) My Code(5) Security(1) Sharepoint(28) SharePoint 2010(1) SharePoint Errors and https://sharenotes.wordpress.com/2008/03/24/error-sgenexe-exited-with-code-1/ Solutions(5) Sharepoint Migration(1) Site Columns(1) SSRS-Reporting Services(1) Troubleshooting(1) Uncategorized(143) Workflows(5) Visitors https://mundeep.wordpress.com/2009/02/12/sgenexe-exited-with-code-1/ Map Blog Stats 393,734 hits Top Clicks sharenotes.files.wordpres…www4.clustrmaps.com/count…sharenotes.files.wordpres…blogs.pointbridge.com/Blo…microsoft.com/downloads/d…kalirajanl.wordpress.com/…blogs.msdn.com/infopath/a…blogs.msdn.com/infopath/a…navwin.com/Topics/AppDoma…blogs.msdn.com/infopath/a… Meta Register Log in Entries RSS Comments RSS WordPress.com Archives January 2011(1) August 2010(1) July 2010(1) May 2010(1) April 2010(1) March 2010(2) January 2010(1) December 2009(1) November 2009(1) October 2009(1) August 2009(1) June 2009(1) April exited with 2009(1) March 2009(1) September 2008(1) August 2008(1) June 2008(2) May 2008(1) April 2008(2) March 2008(8) February 2008(3) December 2007(4) November 2007(3) October 2007(8) August 2007(1) February 2007(2) December 2006(1) October 2006(4) September 2006(4) August 2006(3) July 2006(17) June 2006(20) May 2006(14) April 2006(15) March 2006(10) February 2006(4) January 2006(3) November 2005(1) October 2005(4) September exited with code 2005(9) August 2005(8) July 2005(4) June 2005(4) April 2005(8) March 2005(5) May 2004(1) Error: "sgen.exe" exited with code1 Posted on March 24, 2008 by svarukala While building a project or solution, if you get the error like: "sgen.exe" exited with code 1, then the most probable reason is because you have a different version of the same project's DLL in the GAC. Solution: Open the GAC (C:\Windows\Assembly), find the DLL corresponding to your project. Right click on it and select uninstall Now re-build your project and the problem must be gone. Like this:Like Loading... Related Filed under: SharePoint Errors and Solutions Tagged: | VS .Net « InfoPath Forms Code Error: Schema validation found non-data typeerrors ASP .Net tab missing or SharePoint site leading to Page not found and IIS 32/64-bitmodes » 11 Responses JohanW, on May 9, 2008 at 8:54 am said: Thank you, I was experiencing this exact problem and your solution worked perfectly =) Reply Mike Kelley, on Septem
December 2011 November 2011 August 2011 July 2011 November 2010 October 2010 May 2009 February 2009 October 2008 September 2008 August 2008 July 2008 May 2008 March 2008 December 2007 November 2007 September 2007 Subscribe Subscribe in a reader Blogroll Brian Farnhill's Blog Derelict Techies Mark Rhodes' Blog Sharepoint Tips Meta Register Log in Subscribe Entries (RSS) Comments (RSS) « Retrieving unique values from a column or list in Excel2007 Converting InfoPath Forms into Visual StudioProjects » sgen.exe exited with code1 Posted by mundeep on February 12, 2009 While developing a Sharepoint solution using WSPBuilder and Visual Studio 2005 i noticed that i would get the following error when trying to compile a Release build (on further examination i noticed that it would occur whenever i switched between release & debug builds): "sgen.exe exited with code 1" After doing some research i found a several different suggested solutions: Remove and re-add the project from the solution as per this forum post. Turn off the "Generate serialization assembly" option in the Build tab of Project Properties see this blogpost and this one. Remove the previous version of the assembly from the GAC as per this blogpost. To determine which solution i should use required some more research on sgen.exe does. As per the MSDN article: When the XML Serializer Generator is not used, a XmlSerializer generates serialization code and a serialization assembly for each type every time an application is run. To improve the performance of XML serialization startup, use the Sgen.exe tool to generate those assemblies the assemblies in advance. These assemblies can then be deployed with the application. The XML Serializer Generator can also improve the performance of clients that use XML Web service proxies to communicate with servers because the