KEMBAR78
Codesign Error with Large Framework · Issue #20193 · dotnet/macios · GitHub
Skip to content

Codesign Error with Large Framework #20193

@mkehoe-Extron

Description

@mkehoe-Extron

We have added a framework with a lot of plugins and libraries to our application. We are seeing periodic build failures on our CI system and on local machines when building the release build.

The error always refers to failing to sign libz.dylib in the framework, which definitely exists. Looking at the verbose logging, it appears that libz.dylib is getting signed and resigned a lot of times. Each library in the framework has a reference to libz.dylib. It appears the signing process tries to follow all the dependencies of each library, which causes libz.dylib to get signed way more than needed.

Removing a bunch of unneeded files from the framework reduced the frequency of error. Passing /m:1 to the dotnet command has no effect on the issue.

Steps to Reproduce

Example command:
dotnet publish -f:net7.0-maccatalyst -c:Release BuildIssue.csproj

Expected Behavior

No errors

Actual Behavior

Intermittent error that is returned:
Tool /usr/bin/codesign execution finished (exit code = 1).

..libz.dylib: replacing existing signature
..libz.dylib: No such file or directory

Environment

dotnet maui 7 and 8
Tested with XCode 14.3.1, 15.0.1, and 15.1.

Build Logs

msbuild2.binlog.zip

Example Project (If Possible)

Metadata

Metadata

Assignees

Labels

bugIf an issue is a bug or a pull request a bug fixmsbuildIssues affecting our msbuild tasks/targets

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions