Open steveisok opened 1 year ago
Thanks for copying this over @steveisok.
Here is some extra data on the environment:
<TargetFramework>net7.0-macos</TargetFramework>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<RuntimeIdentifiers>osx-x64</RuntimeIdentifiers>
And here is the workaround I mention in the bug report that does not work:
<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/13417 -->
<PropertyGroup>
<CodesignDependsOn>CodeSignCreateDump;$(CodesignDependsOn)</CodesignDependsOn>
</PropertyGroup>
<Target Name="CodeSignCreateDump" Condition="'$(_CodeSigningKey)' != ''">
<Codesign Condition="'$(IsMacEnabled)' == 'true'" SessionId="$(BuildSessionId)" ToolExe="$(CodesignExe)" ToolPath="$(CodesignPath)" CodesignAllocate="$(_CodesignAllocate)" DisableTimestamp="$(_CodesignDisableTimestamp)" Keychain="$(CodesignKeychain)" Resources="$(AppBundleDir)\Contents\MonoBundle\createdump" SigningKey="$(_CodeSigningKey)" ExtraArgs="$(CodesignExtraArgs)" UseHardenedRuntime="$(UseHardenedRuntime)" StampFile="" UseSecureTimestamp="$(UseHardenedRuntime)" />
</Target>
<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/13417 -->
I just want to report on a solution presented elsewhere.
The option presented here https://github.com/xamarin/xamarin-macios/issues/13417
which is to change codesign to add Resources="$(AppBundleDir)\Contents\MonoBundle\createdump"
fails with:
The "Codesign" task was not given a value for the required parameter "StampFile", nor was there a "CodesignStampFile" metadata on the resource <APP>/Contents/MonoBundle/createdump.
Apparently this issue was fixed and the issue is set to resolved. Looking at the delta - it seems they have added the same Resources items.
Is there a workaround that can be used for this issue in the short term? Thanks.
Is there a workaround that can be used for this issue in the short term? Thanks.
Adding this to the csproj should remove createdump
from the app bundle:
<Target Name="RemoveCreateDump" BeforeTargets="_ComputePublishLocation" AfterTargets="ComputeFilesToPublish">
<ItemGroup>
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.Filename)' == 'createdump'" />
</ItemGroup>
</Target>
I can confirm that this works. Thank you!
Moved from https://github.com/dotnet/runtime/issues/89285
Description
I have upgraded a Xam.Mac app to .Net for Mac. In the process, I also upgraded to .Net 7 and C# 11. I’m trying to upload it to the app store. This worked under Xam.Mac, but does not work now.
The problem is that there is a new application automatically added to the Application bundle - createdump - which does not get signed properly.
I see that this has been raised before (e.g. https://github.com/dotnet/runtime/issues/83613), but those are all closed without actually saying how to work around the issue.
Steps to Reproduce
Invalid Code Signing. The executable MYAPP.pkg/Payload/MYAPP.app/Contents/MonoBundle/createdump' must be signed with the certificate that is contained in the provisioning profile.
Expected Behavior
Either:
Right now, my app cannot be uploaded to the app store.
Actual Behavior
createdump is not being signed.
Environment
Version information
``` VSMac Version: 17.6 (build 1575) MacOS Version: 13.4.1 (latest) ```Build Logs
Example Project (If Possible)