locked
"sgen.exe" exited with code 1 RRS feed

  • Question

  • User288065 posted

    Hello,

    I'm making a Xamarin Cross-platform application an I have a problem. My application works on Android but when I want to build for iOS I have this error message :

    "sgen.exe" exited with code 1

    I don't know why I have this. I have the connection with the Mac, I can show the simulator but I have this problem.

    Somebody can help me ?

    Thank you, Karim

    Wednesday, April 12, 2017 2:01 PM

All replies

  • User131278 posted

    Please check that both machines are on latest Stable, then do a clean + rebuild. If that does not help, please attach the version information for both Mac and Windows, as well as the verbose build output. Thanks!

    Wednesday, April 12, 2017 3:30 PM
  • User327586 posted

    I`m facing the same problem, i have already reinstalled Visual Studio, i installed a MonoFramework 4.81, but nothing solved my issue.

    I can debug in simulator the code, but i can`t generate .ipa by running Release/Iphone in MAC

    Any progress?

    Wednesday, May 31, 2017 5:52 PM
  • User258 posted

    I get the same. It might be bug when you're using SOAP web references for iOS and Mac in Mono 5.x

    https://forums.xamarin.com/discussion/96856/error-msb6006-sgen-exe-exited-with-code-1-since-stable-update-last-tuesday https://forums.xamarin.com/discussion/93991/unable-to-generate-a-temporary-class-in-release-mode

    Currently, we have to deploy that iOS app from an older XS installation. The new VSfM toolchain does not seem to work with SOAP web references.

    Wednesday, July 12, 2017 8:38 AM
  • User252883 posted

    That helped me figure out what's going on. This is a msbuild vs xbuild bug:

    xbuild WebServicesNotWorking.sln /p:Configuration=Release (Works) msbuild WebServicesNotWorking.sln /p:Configuration=Release (Your error).

    Resolution:

    1. Use Xamarin Studio instead of VS for Mac
    2. Uncheck Preferences -> Projects -> Build -> Build with MSBuild instead of xbuild (I don't recommend this as it may affect other things)
    3. Build the project with xbuild and check in the output for now.
    Monday, October 9, 2017 5:00 AM
  • User252883 posted

    That helped me figure out what's going on. This is a msbuild vs xbuild bug:

    xbuild WebServicesNotWorking.sln /p:Configuration=Release (Works) msbuild WebServicesNotWorking.sln /p:Configuration=Release (Your error).

    Resolution:

    1. Use XS instead of VSfM
    2. Uncheck Preferences -> Projects -> Build -> Build with MSBuild instead of xbuild (I don't recommend this as it may affect other things)
    3. Build the project with xbuild and check in the output for now.
    Monday, October 9, 2017 5:25 AM