Visual Studio raises an error MT1045 Failed to execute when deploy a MAUI app to a real device

Enrico Rossini 186 Reputation points
2024-02-16T20:01:18.5766667+00:00

I have my .NET8 MAUI application and I try to test it on my physical iPhone. Visual Studio 17.8.7 is connected to my iMac and the iPhone to the iMac. The deployment on Simulator is working fine. When I deploy on the iPhone, Visual Sutdio shows this error

error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/dm/bwmxpbzn6bvdsyy73c_b453w0000gn/T/tmpBkAavG.tmp device install app --device "Enrico???s iPhone" /Users/enrico/Library/Caches/Xamarin/mtbs/builds/LanguageInUse/1fa03704bb15e35c6f47a701d9d92131e3e0740198296a93338bb3c829bc9cf7/bin/Debug/net8.0-ios/ios-arm64/device-builds/iphone15.2-17.3.1/LanguageInUse.app' returned the exit code 1. In the Output window, I also notice this error:

NSLocalizedFailureReason = This app cannot be installed because its integrity could not be verified. NSLocalizedRecoverySuggestion = Failed to install embedded profile for com.languageinuse.app : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

I like to highlight that I deployed the application on the iPhone roughly a month ago without issues. I got the Provisioning Profile from the Apple Store and so on.

The configuration on Visual Studio for iOS is the following.

enter image description here

What can I do to fix this issue?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,231 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 29,381 Reputation points Microsoft Vendor
    2024-02-19T06:59:16.5366667+00:00

    Hello,

    From the screenshot, you selected the distribute provisioning profile which is for release and AppStore, but you should select a development provisioning profile.

    If you have the profile, you could select it. If not, please follow the steps to create development provisioning profile in the doc - Manual provisioning for .NET MAUI iOS apps - .NET MAUI | Microsoft Learn, then download the development provisioning profiles and use it.

    (Pay attention to adding your device)

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments