How to correctly regenerate expired provisioning profiles and use them in .NET MAUI iOS apps?

I have a .NET MAUI iOS app where its provisioning profiles at first expired a few days ago. So I created new "Apple Development" and "Apple Distribution" certificates using an existing certificate signing request created on 19 October 2023 at 11:46 AM, included the new certificates in the expired provisioning profiles, regenerated and downloaded the provisioning profiles.

In the "bundle signing" section of the "project properties" window of Visual Studio for Mac version 17.6.14 (build 413), I have made the following settings:

  • Configuration: release
  • Platform: any CPU
  • Signing identity is not set to automatic

I have selected the correct provisioning profile, but when deploying the app in release mode, the following error message is thrown so the app cannot be deployed to the device:

ERROR: Failed to install the app on the device. (com.apple.dt.CoreDeviceError error 3002.)
         NSURL = file:///Users/intelligenthosting/Desktop/IMA-Attendance-App/maui/maui/bin/Release/net7.0-ios/ios-arm64/maui.app/
       ----------------------------------------
       Unable to Install ?IMA Attendance? (IXUserPresentableErrorDomain error 14.)
         NSLocalizedRecoverySuggestion = Failed to install embedded profile for com.imaedu.attendanceapp : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)
         NSLocalizedFailureReason = This app cannot be installed because its integrity could not be verified.
       ----------------------------------------
       Failed to install embedded profile for com.imaedu.attendanceapp : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) (MIInstallerErrorDomain error 13.)
         SourceFileLine = 308
         FunctionName = -[MIInstallableBundle _installEmbeddedProfilesWithError:]
         LibMISErrorNumber = -402620385
         LegacyErrorString = ApplicationVerificationFailed
1%... 2%... 3%... 4%... 5%... 6%... 7%... 8%... 9%... 10%... 11%... 12%... 13%... 14%... 15%... 16%... 18%... 19%... 20%... 21%... 22%... 23%... 24%... 25%... 26%... 27%... 28%... 30%... 31%... 32%... 33%... 34%... 35%... 36%... 37%... 38%... 39%... 40%... 41%... 42%... 43%... 44%... 45%... 46%... 47%... 48%... 49%... 50%... 51%... 52%... 53%... 54%... 55%... 56%... 57%... 59%... 60%... 62%... 66%... 68%... 

error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/ny/qt1fm9zx063__j1b_nglx8pw0000gn/T/tmpFalYTp.tmp device install app --device "iPad (3)" /Users/intelligenthosting/Desktop/IMA-Attendance-App/maui/maui/bin/Release/net7.0-ios/ios-arm64/maui.app' returned the exit code 1.

Application could not be uploaded to the device.

What have I done wrong in the above process? What is the most appropriate method to update expired provisioning profiles? Thanks in advance

How to correctly regenerate expired provisioning profiles and use them in .NET MAUI iOS apps?
 
 
Q