"sgen.exe" exited with code 1

KarimFlactionKarimFlaction USMember

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

Answers

  • AshleyGazichAshleyGazich USXamarin Team Xamurai

    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!

  • luizclucasluizclucas BRMember

    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?

  • voidvoid DKBeta ✭✭✭
    edited July 12

    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.

  • ermayank001ermayank001 INMember

    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.
  • ermayank001ermayank001 INMember

    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.
Sign In or Register to comment.