Skip to content

iOS: Publish failed with "_GenerateDSym" failure if specify "-o:{path to custom directory}" #17496

Open

Description

@PureWeen

Issue moved from dotnet/maui#13231


From @eshvatskyi on Thursday, February 9, 2023 6:05:23 PM

Description

publish process failed with error: "_GenerateDSym target" failed, dsymutil exited with code 1

Steps to Reproduce

add -o:$publishDir to your "dotnet publish" command

Link to public reproduction project repository

no need

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

iOS

Affected platform versions

iOS

Did you find any workaround?

Do not use "-o:$publishDir "

Relevant log output

No response

Activity

  1. PureWeen commented on Feb 9, 2023

    @PureWeen
    MemberAuthor

    Issue moved from dotnet/maui#13231


    From @jsuarezruiz on Thursday, February 9, 2023 7:08:04 PM

    Could you share more info?, more detailed output logs?

  2. rolfbjarne commented on Feb 13, 2023

    @rolfbjarne
    Member

    This worked fine for me:

    $ dotnet new ios
    The template "iOS Application" was created successfully.
    
    $ dotnet publish -o pubdir -p:RuntimeIdentifier=ios-arm64
    MSBuild version 17.4.0+18d5aef85 for .NET
      Determining projects to restore...
      Restored /Users/rolf/test/dotnet/publishwithoutputdir/publishwithoutputdir.csproj (in 111 ms).
      Detected signing identity:
    
        Code Signing Key: "Apple Development: Rolf Kvinge (CZ9YXM2X9A)" (14BDF186AB46C5467379D161A3ACA6844E4A5003)
        Provisioning Profile: "iOS Team Provisioning Profile: *" (19aa9163-62ce-4f0c-b7d6-28d7e429edec)
        Bundle Id: com.companyname.publishwithoutputdir
        App Id: TGFVQHFHZF.com.companyname.publishwithoutputdir
      publishwithoutputdir -> /Users/rolf/test/dotnet/publishwithoutputdir/bin/Debug/net7.0-ios/ios-arm64/publishwithoutputdir.dll
      Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
      Optimizing assemblies for size. This process might take a while.
      Created the package: /Users/rolf/test/dotnet/publishwithoutputdir/pubdir/publishwithoutputdir.ipa
    
    Workload updates are available. Run `dotnet workload list` for more information.
    
    $ ls -la pubdir
    total 8312
    drwxr-xr-x   3 rolf  staff       96 Feb 13 07:26 .
    drwxr-xr-x  14 rolf  staff      448 Feb 13 07:26 ..
    -rw-r--r--   1 rolf  staff  4255441 Feb 13 07:26 publishwithoutputdir.ipa
    

    Please add the -bl:msbuild.binlog flag to your dotnet publish command (dotnet publish -bl:msbuild.binlog ...) to get a binary build log, and then upload that build log here.

  3. added this to the Future milestone on Feb 13, 2023
  4. added
    need-info
    on Feb 13, 2023
  5. eshvatskyi commented on Feb 13, 2023

    @eshvatskyi

    binlog https://drive.google.com/file/d/1EBz2BGJm3nkIj_htKUjI-saIIp2LHtOJ/view?usp=sharing
    `0.3/lib/net6.0-ios15.4/Firebase.Installations.resources/FirebaseInstallations.xcframework/ios-arm64/FirebaseInstallations.framework/ /Users/admin/Library/Caches/Xamarin/mtbs/builds/src/Anteater.Intercom.Mau
    i/bin/Release/net7.0-ios/ios-arm64/Anteater.Intercom.Maui.app/Frameworks/FirebaseInstallations.framework --arch arm64
    Tool xcrun execution finished (exit code = 1).

    error: cannot parse the debug map for '/Users/admin/Library/Caches/Xamarin/mtbs/builds/Anteater.Intercom.Maui/e60d9e32c4922fb0e68e4b0b509bf9869f8318130e0d0f43ac00da02dce6e78a/bin/Release/net7.0-ios/ios-arm6
    4/Anteater.Intercom.Maui.app/Anteater.Intercom.Maui': No such file or directory

    C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.1024\tools\msbuild\iOS\Xamarin.Shared.targets(2612,3): error : dsymutil exited with code 1: [D:\WORK\Anteater\Anteater.Intercom\src\Anteater.Intercom.Maui
    Anteater.Intercom.Maui.csproj::TargetFramework=net7.0-ios]
    C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.1024\tools\msbuild\iOS\Xamarin.Shared.targets(2612,3): error : error: cannot parse the debug map for '/Users/admin/Library/Caches/Xamarin/mtbs/builds/Antea
    ter.Intercom.Maui/e60d9e32c4922fb0e68e4b0b509bf9869f8318130e0d0f43ac00da02dce6e78a/bin/Release/net7.0-ios/ios-arm64/Anteater.Intercom.Maui.app/Anteater.Intercom.Maui': No such file or directory [D:\WORK\Antea
    ter\Anteater.Intercom\src\Anteater.Intercom.Maui\Anteater.Intercom.Maui.csproj::TargetFramework=net7.0-ios]`

  6. ghost removed
    need-info
    on Feb 13, 2023
  7. ghost added
    need-attention
    on Feb 13, 2023
  8. added
    bug
    msbuild
    and removed
    need-attention
    on Feb 14, 2023
  9. rolfbjarne commented on Feb 14, 2023

    @rolfbjarne
    Member

    Binlog: msbuild.binlog.zip

    Looks like this is only a problem when building from Windows, it works fine when building from Mac.

  10. added
    windows-only
    on Feb 14, 2023
  11. AlleSchonWeg commented on Jan 17, 2025

    @AlleSchonWeg

    @rolfbjarne
    I have the same problem. See linked issue. I think a fix is still far away. ;)

  12. ajohnstone-ks commented on May 7, 2025

    @ajohnstone-ks

    I was having this error as well, using Maui 9 doing dotnet publish from Windows. Removing the -o fixed it. It was be great if this was fixed, since being able to control all of the build from windows makes our build process much simpler.

  13. rolfbjarne commented on May 7, 2025

    @rolfbjarne
    Member

    Could you explain exactly which outputs you need to show up in the directory you pass to -o? Is it the .ipa (and .dSYM) or anything else?

  14. ajohnstone-ks commented on May 7, 2025

    @ajohnstone-ks

    @rolfbjarne Just the IPA, so that we can upload it later to be available to our testers or to the AppStore via Transporter.

  15. rolfbjarne commented on May 7, 2025

    @rolfbjarne
    Member

    @ajohnstone-ks using the IpaPackagePath property might work in that case:

    dotnet publish ... /p:IpaPackagePath=relative\path\to\my.ipa

  16. ajohnstone-ks commented on May 7, 2025

    @ajohnstone-ks

    @rolfbjarne Thank you, I will try that.

    But I'd also like to say I don't think its that much of an unreasonable expectation that dotnet publish -o <outputdir> work consistently no matter what you're publishing. Certainly it should not result in a cryptic error message where the fix is "set this property instead of using -o" or moving some other properties from the command line to the csproj file (which is what got me past this error when I was first trying to move to Maui 8)

  17. rolfbjarne commented on May 7, 2025

    @rolfbjarne
    Member

    I agree -o ... should work, but it looks like it's rather complicated to fix, the particular problem with the _GenerateDSym target is just the top of the iceberg, so I'm suggesting an alternative solution for your particular scenario that will hopefully work for you.

  18. ajohnstone-ks commented on May 7, 2025

    @ajohnstone-ks

    Sorry, I didn't mean to sound like I don't appreciate your help getting past this by suggesting a work around, I do very much appreciate it, and I realize there's no other way to help. Just was venting a bit as this has been another in a long list of cryptic error messages I've had to deal with converting from Xarmin to Maui, some of which apparently have also been around for a while now.

    Unfortuatenly /p:IpaPackagePath also results in an error; it looks like its adding the value of that to the path on the Mac where the IPA is being built, which creates a path that doesn't exist when creating the zip (IPA I assume)

    I was able to get it to work though if I drop the -o parameter and then look for an IPA in .\bin\Release\* of the Windows machine after the build finishes, so I think I can move on from this issue now.

  19. rolfbjarne commented on May 8, 2025

    @rolfbjarne
    Member

    Sorry, I didn't mean to sound like I don't appreciate your help getting past this by suggesting a work around, I do very much appreciate it, and I realize there's no other way to help. Just was venting a bit as this has been another in a long list of cryptic error messages I've had to deal with converting from Xarmin to Maui, some of which apparently have also been around for a while now.

    I completely understand how running into bugs can be a really frustrating experience, so no worries.

    Unfortuatenly /p:IpaPackagePath also results in an error; it looks like its adding the value of that to the path on the Mac where the IPA is being built, which creates a path that doesn't exist when creating the zip (IPA I assume)

    That's a bummer, I'll see if we can get at least that fixed.

    I was able to get it to work though if I drop the -o parameter and then look for an IPA in .\bin\Release\* of the Windows machine after the build finishes, so I think I can move on from this issue now.

    That's good to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmsbuildwindows-only

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions