Skip to content

Commit

Permalink
[msbuild] Make code signing required when archiving a macOS or Mac Ca…
Browse files Browse the repository at this point in the history
…talyst app.

We fail later with an uninformative error ('The "Archive" task was not given a
value for the required parameter "SigningKey"') otherwise, and this way the
user doesn't have to manually enable signing to avoid the this error.
  • Loading branch information
rolfbjarne committed Jul 27, 2021
1 parent 1aaf940 commit 9158dcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions msbuild/Xamarin.Shared/Xamarin.Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ Copyright (C) 2020 Microsoft. All rights reserved.
<PropertyGroup Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">
<!-- macOS and Mac Catalyst projects use the 'EnableCodeSigning' variable to enable code signing -->
<_RequireCodeSigning Condition="'$(_RequireCodeSigning)' == ''">$(EnableCodeSigning)</_RequireCodeSigning>
<!-- Signing must be enabled when archiving -->
<_RequireCodeSigning Condition="'$(_RequireCodeSigning)' == '' And '$(ArchiveOnBuild)' == 'true'">true</_RequireCodeSigning>
<!-- Extensions must be signed, so make sure they are -->
<_RequireCodeSigning Condition="'$(_RequireCodeSigning)' == '' And '$(IsAppExtension)' == 'true'">true</_RequireCodeSigning>
<!-- Otherwise code signing is disabled by default -->
Expand Down

0 comments on commit 9158dcc

Please sign in to comment.