xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

[macOS] Build warning "Code signing has been requested multiple times"

Open tipa opened this issue 3 years ago • 2 comments

I encountered a build warning when dealing with this issue and it was recommended to me to open a new issue for it.

Steps to Reproduce

  1. create .NET for macOS app and target both x64 and arm64
  2. build and sign app with Entitlements.plist

Expected Behavior

no warning

Actual Behavior

this warning shows: /usr/local/share/dotnet/packs/Microsoft.macOS.Sdk/12.3.442/tools/msbuild/macOS/Xamarin.Shared.targets(2053,3): warning : Code signing has been requested multiple times for 'bin/Debug/net6.0-macos/publish/../myapp.app/Contents/MonoBundle/createdump', with different metadata. The metadata 'CodesignEntitlements' has different values for each item (once it's 'obj/Debug/net6.0-macos/osx-x64/Entitlements.xcent', another time it's 'obj/Debug/net6.0-macos/osx-arm64/Entitlements.xcent'). [/Users/tp/GitHub/myapp.csproj]

Environment

Visual Studio Community 2022 for Mac Preview
Version 17.3 Preview (17.3 build 2089)
Installation UUID: 71eca455-cb6f-426b-9b4d-b6c14394522c

Runtime
.NET 6.0.5 (64-bit)
Architecture: Arm64

Roslyn (Language Service)
4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608

NuGet
Version: 6.2.1.2

.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/6.0.400-preview.22330.6/Sdks
SDK Versions:
	6.0.400-preview.22330.6
	6.0.302
	6.0.301
	6.0.300
	6.0.203
	6.0.202
	6.0.201
	6.0.100-rc.1.21463.6
	5.0.402 (x64 – Unsupported)
	5.0.401 (x64 – Unsupported)
	5.0.400 (x64 – Unsupported)
	5.0.302 (x64 – Unsupported)
	5.0.301 (x64 – Unsupported)
	5.0.203 (x64 – Unsupported)
	5.0.202 (x64 – Unsupported)
	5.0.201 (x64 – Unsupported)
	3.1.414 (x64 – Unsupported)
	3.1.413 (x64 – Unsupported)
	3.1.412 (x64 – Unsupported)
	3.1.411 (x64 – Unsupported)
	3.1.410 (x64 – Unsupported)
	3.1.409 (x64 – Unsupported)
	3.1.408 (x64 – Unsupported)
	3.1.407 (x64 – Unsupported)
MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET SDK (x64)
SDK Versions:
	6.0.400-preview.22330.6
	6.0.302
	6.0.301
	6.0.300
	6.0.203
	6.0.202
	6.0.201
	6.0.200
	5.0.408
	5.0.407
	5.0.406
	5.0.405
	3.1.421
	3.1.420
	3.1.419
	3.1.418
	3.1.417
	3.1.416

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	6.0.7
	6.0.6
	6.0.5
	6.0.4
	6.0.3
	6.0.0-rc.1.21451.13
	5.0.11 (x64 – Unsupported)
	5.0.10 (x64 – Unsupported)
	5.0.9 (x64 – Unsupported)
	5.0.8 (x64 – Unsupported)
	5.0.7 (x64 – Unsupported)
	5.0.6 (x64 – Unsupported)
	5.0.5 (x64 – Unsupported)
	5.0.4 (x64 – Unsupported)
	3.1.20 (x64 – Unsupported)
	3.1.19 (x64 – Unsupported)
	3.1.18 (x64 – Unsupported)
	3.1.17 (x64 – Unsupported)
	3.1.16 (x64 – Unsupported)
	3.1.15 (x64 – Unsupported)
	3.1.14 (x64 – Unsupported)
	3.1.13 (x64 – Unsupported)

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
	6.0.7
	6.0.6
	6.0.5
	6.0.4
	6.0.3
	6.0.2
	5.0.17
	5.0.16
	5.0.15
	5.0.14
	3.1.27
	3.1.26
	3.1.25
	3.1.24
	3.1.23
	3.1.22

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 13.4.1 (20504)
Build 13F100

Xamarin.Mac
Version: 8.12.0.2 (Visual Studio Community)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:54-0400

Xamarin.iOS
Version: 15.12.0.2 (Visual Studio Community)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:55-0400

Xamarin Designer
Version: 17.3.0.208
Hash: 0de472ea0
Branch: remotes/origin/d17-3
Build date: 2022-07-28 19:17:21 UTC

Xamarin.Android
Not Installed

Microsoft Build of OpenJDK
Java SDK: Not Found

Eclipse Temurin JDK
Java SDK: Not Found

Android SDK Manager
Version: 17.3.0.23
Hash: 965bf40
Branch: remotes/origin/d17-3
Build date: 2022-07-28 19:17:26 UTC

Android Device Manager
Version: 0.0.0.1169
Hash: fafb1d5
Branch: fafb1d5
Build date: 2022-07-28 19:17:26 UTC

Build Information
Release ID: 1703002089
Git revision: 7084b0b25b06c8e379d0bc5dabb954adca235373
Build date: 2022-07-28 19:14:50+00
Build branch: release-17.3
Build lane: release-17.3

Operating System
Mac OS X 12.5.0
Darwin 21.6.0 Darwin Kernel Version 21.6.0
    Sat Jun 18 17:05:47 PDT 2022
    root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 arm64


Build Logs

msbuild.binlog.zip

tipa avatar Aug 04 '22 18:08 tipa

Possibly introduced by @rolfbjarne 's code signing changes.

chamons avatar Aug 04 '22 18:08 chamons

Note to self: I believe the fix would be to compile the entitlements once per build (as opposed to once per architecture).

rolfbjarne avatar Aug 22 '22 10:08 rolfbjarne

I do also have this problem and i am relatively new to coding. How do i fix this.

AlexanderZuehr avatar Dec 09 '22 18:12 AlexanderZuehr

@AlexanderZuehr this is just a warning and shouldn't prevent anything from working, so you should be able to just ignore it. If that's not the case, please file a new issue and we'll figure out what's going on.

rolfbjarne avatar Dec 12 '22 10:12 rolfbjarne