Forum Xamarin.iOS

Build IPA Package

FredLFredL Member ✭✭

Hi,

I have an issue with my xamarin project developed with Visual Studio 2017. I cannot create IPA Package when I rebuild my solution.
I succeeded it last month and my app is available on Testflight, and now It is impossible to rebuild it.

When I rebuild my solution, I have the following error:

It don't understand '4' in the error message.

For me, nothing changed in my project but...

Thanks a lot for your answers.

Fred

Tagged:

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    I have an issue with my xamarin project developed with Visual Studio 2017.

    Firstly i suggest you update to visual studio 2019 to check if problem persists .

  • FredLFredL Member ✭✭

    Hi,
    Thank you for your response. I will try to migrate in visual studio 2019.
    But I don't understand why now the solution doesn't work. Very Strange….

    Here the detail of the error

    2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(983,3): error : Tool exited with code: 1. Output: warning: ignoring unknown option: -t
    2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(983,3): error : error: cannot parse the debug map for '4': No such file or directory
    2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(983,3): error :

  • FredLFredL Member ✭✭

    I tried with VS 2019.
    I have the same error.

    2> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -t 4 -z -o bin/iPhone/Debug/TimeReport.iOS.app.dSYM bin/iPhone/Debug/TimeReport.iOS.app/TimeReport.iOS
    2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1029,3): error MSB6006: "dsymutil" exited with code 1.

    I uninstall xcode on the Mac and reinstall it.

    I have no idea….

  • LukeBailey.9712LukeBailey.9712 USMember ✭✭

    I am having the same error. Using Visual Studio 2017, using Visual Studio 2019 is not an option for my team at this moment.

    I am using the latest version of Xamarin Forms (4.5.0.495)

    Here is the error:

    3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(917,3): error : error: cannot parse the debug map for '4': No such file or directory

  • FredLFredL Member ✭✭

    I think more and more it is due to an update in visual studio or XCode.
    I hope it will be corrected in few days.

    Nothing changed in my project since the last creation of IPA package....

  • bsYebsYe Member ✭✭

    @FredL said:
    I think more and more it is due to an update in visual studio or XCode.
    I hope it will be corrected in few days.

    Nothing changed in my project since the last creation of IPA package....

    Hi guys, I have the same error:
    Tool exited with code: 1. Output: warning: ignoring unknown option: -t error: cannot parse the debug map for '4': No such file or directory

    Is this problem solved?

  • bsYebsYe Member ✭✭

    如果解决了,请联系我,这真的对我很重要

  • RezaMohamedRezaMohamed USMember ✭✭✭

    try moving your project to a root folder, I have noticed that all that deep nesting of folders causes name size issues. usually fixed by moving your project to a shorter folder on the root

  • LukeBailey.9712LukeBailey.9712 USMember ✭✭

    @RezaMohamed said:
    try moving your project to a root folder, I have noticed that all that deep nesting of folders causes name size issues. usually fixed by moving your project to a shorter folder on the root

    I have tried that to see if the file names were to long, but even moving directly to my C drive, no luck

    Hopefully someone finds a solution soon as my team needs to make an ipa file for enterprise distribution

  • bsYebsYe Member ✭✭

    @RezaMohamed said:
    try moving your project to a root folder, I have noticed that all that deep nesting of folders causes name size issues. usually fixed by moving your project to a shorter folder on the root

    When I use the simulator to create the IPA suite, it succeeds, but the real machine fails.

  • RezaMohamedRezaMohamed USMember ✭✭✭

    @bsYe I am not following what you are saying. Are you able to test your app on the ios simulator just fine? And when you say it fails on the real machine, do you mean it fails on the phone? is it when you connect the phone to the Mac and then deploy in Debug, or when you upload the IPA to the App Store in Test flight.

  • bsYebsYe Member ✭✭

    @RezaMohamed said:
    @bsYe I am not following what you are saying. Are you able to test your app on the ios simulator just fine? And when you say it fails on the real machine, do you mean it fails on the phone? is it when you connect the phone to the Mac and then deploy in Debug, or when you upload the IPA to the App Store in Test flight.

    Yes, i generated successfully in the simulator and can debug it, but failed to generate on iphone

  • RezaMohamedRezaMohamed USMember ✭✭✭
    edited April 3

    You need to be more specific if you want help. Where does it fail, what is the error message, have you created your provisioning profiles correctly, are you linking correctly in your bundle options.

    If this is your error message "codesign exited with code 1" you don't have your provisioning profiles setup correctly in your bundle options.

  • bsYebsYe Member ✭✭

    @RezaMohamed said:
    You need to be more specific if you want help. Where does it fail, what is the error message, have you created your provisioning profiles correctly, are you linking correctly in your bundle options.

    If this is your error message "codesign exited with code 1" you don't have your provisioning profiles setup correctly in your bundle options.

    No, I have n’t changed anything from beginning to end. The application worked perfectly until I updated vs for mac, Xcode, vs.

  • RezaMohamedRezaMohamed USMember ✭✭✭

    Sorry, I don't think I can help because you aren't being specific at all as to what your issue is. Good luck

  • ka_egalka_egal Member ✭✭

    I am also run into struggle after the last XCode update I think.

    Xamarin.iOS.Common.targets(1029, 3): [MSB6006] "dsymutil" exited with code 1.

    On 1029:

    <!-- run dsymutil on the main bundle -->
    <DSymUtil
        SessionId="$(BuildSessionId)"
        Condition="'$(IsMacEnabled)' == 'true' And '$(MtouchNoDSymUtil)' == 'false' And '$(IsAppExtension)' == 'false'"
        AppBundleDir="$(AppBundleDir)"
        Architectures="$(_CompiledArchitectures)"
        DSymDir="$(AppBundleDir).dSYM"
        Executable="$(_NativeExecutable)"
        ToolExe="$(DSymUtilExe)"
        ToolPath="$(DSymUtilPath)"
    >
    </DSymUtil>
    

    Before the Update everything worked finde.

  • FredLFredL Member ✭✭

    I am like you ka_egal, I think it is due to an update of xcode or Mac OS.
    I hope a next update will solve this issue.
    Unfortunatly, I leave the App project for 6 months, so in october, when I will be back, I hope the compilation will run.
    I will continue to follow this topic during the next 6 months.

    Fred

  • bsYebsYe Member ✭✭

    @ka_egal said:
    I am also run into struggle after the last XCode update I think.

    Xamarin.iOS.Common.targets(1029, 3): [MSB6006] "dsymutil" exited with code 1.

    On 1029:

    <DSymUtil
        SessionId="$(BuildSessionId)"
        Condition="'$(IsMacEnabled)' == 'true' And '$(MtouchNoDSymUtil)' == 'false' And '$(IsAppExtension)' == 'false'"
        AppBundleDir="$(AppBundleDir)"
        Architectures="$(_CompiledArchitectures)"
        DSymDir="$(AppBundleDir).dSYM"
        Executable="$(_NativeExecutable)"
        ToolExe="$(DSymUtilExe)"
        ToolPath="$(DSymUtilPath)"
    >
    </DSymUtil>
    

    Before the Update everything worked finde.

    Does it have anything to do with Xcode and Mac versions? If yes, I will try to reinstall Xcode

  • LukeBailey.9712LukeBailey.9712 USMember ✭✭

    I too am able to run in debug mode on the iOS simulator with no issues. The error only displays while set to Ad-Hoc trying to generate a .ipa file from making a build.

  • RezaMohamedRezaMohamed USMember ✭✭✭

    For the code 1 issue, I have found that its because of the provisioning profiles. Try the manual and automatic options and see if they work...make sure you have the right bundle id and the provision profile associated to it

  • hobbitenok2010hobbitenok2010 Member ✭✭
    edited April 3

    My colleagues and myself just experienced the same issue with the build. The specific error was cannot parse the debug map for '4': No such file or directory. We upgraded to Xode 11.4 and VS 16.5.2 and started getting the error described when running our build process. After some investigation we found, that we were using older version of MSBuild from VS 2017 for the builds and changed it to 2019. The builds started working after that.
    Note, that we are using Cake with MSBuild, so for us it was just adding settings.SetConfiguration(configuration) .UseToolVersion(MSBuildToolVersion.VS2019). It may take some manipulation with Path or some other configurations, to get the correct version of MSBuild running.

    Hope this helps!

  • ka_egalka_egal Member ✭✭

    @FredL @LukeBailey.9712

    today there were new updates for Xamarin and .Net Core and they fixed my Problem, everything works again!

  • SpiroDavisSpiroDavis Member ✭✭

    @hobbitenok2010 said:
    My colleagues and myself just experienced the same issue with the build. The specific error was cannot parse the debug map for '4': No such file or directory. We upgraded to Xode 11.4 and VS 16.5.2 and started getting the error described when running our build process. After some investigation we found, that we were using older version of MSBuild from VS 2017 for the builds and changed it to 2019. The builds started working after that.
    Note, that we are using Cake with MSBuild, so for us it was just adding settings.SetConfiguration(configuration) .UseToolVersion(MSBuildToolVersion.VS2019). It may take some manipulation with Path or some other configurations, to get the correct version of MSBuild running.

    Hope this helps!

    Hi! Im getting the same error.

    Can you explain how you upgrade the MSBuild from 2017 to 2019?, did you upgrade VS2017 to 2019 or its a configuration in VS2017?

    in my Macbook iahve Catelina OS, last Xcode and VS2019 for MAC

  • hobbitenok2010hobbitenok2010 Member ✭✭

    @SpiroDavis said:

    @hobbitenok2010 said:
    My colleagues and myself just experienced the same issue with the build. The specific error was cannot parse the debug map for '4': No such file or directory. We upgraded to Xode 11.4 and VS 16.5.2 and started getting the error described when running our build process. After some investigation we found, that we were using older version of MSBuild from VS 2017 for the builds and changed it to 2019. The builds started working after that.
    Note, that we are using Cake with MSBuild, so for us it was just adding settings.SetConfiguration(configuration) .UseToolVersion(MSBuildToolVersion.VS2019). It may take some manipulation with Path or some other configurations, to get the correct version of MSBuild running.

    Hope this helps!

    Hi! Im getting the same error.

    Can you explain how you upgrade the MSBuild from 2017 to 2019?, did you upgrade VS2017 to 2019 or its a configuration in VS2017?

    in my Macbook iahve Catelina OS, last Xcode and VS2019 for MAC

    So, I can't explain it for MAC, but I can tell what could be tried on PC.

    We had installed VS2019 additionally to VS2017 and had side-by-side installation. Correspondingly there were 2 installations of MSBuild in each folder. We did point to a correct one in the Cake file which we use for build, but someone who uses MSbuild as is could try changing PATH to point to a correct MSBuild. For instance standard installation for PC would be - "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin" This can change to "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/15.0/Bin"
    Alternatively one can launch MSBuild from the corresponding folder.

    For MAC you could perhaps try this article and see if this helps with using PATH - https://medium.com/@imstudio/path-macos-best-practice-for-path-environment-variables-on-mac-os-35ec4076a486

    This said, I don't know exactly how to make it working on MAC.

  • SpiroDavisSpiroDavis Member ✭✭

    Hi every one! thanks for the reply, finally to coninues with the app i dev, i had to do the next:

    1. reset my laptop macbook
    2. install last XCode
    3. install last VS for mac
    4. on my windows laptop, install vs 2019
    5. open the solution with vs 2019
    6. pair laptops, windows with mac
    7. F5 and ready
    8. Solution compiled without problem

    Conslusion: bye VS2017, hello to VS2019

    I hope so VS2020 dont arrives yet, haha!

    thansk!

    see you

Sign In or Register to comment.