Xamarin.iOS: Failed to generate Ad-Hoc | Release Build from Migrated Project (Microsoft.NET.Sdk)

Matrix ComSec 5 Reputation points
2024-09-07T11:35:21.08+00:00

Hello,

Error: Configuration doesn't target device

Tools: Visual Studio 2022 (Version 17.6.14)


According to the process of upgrade project from Xamarin to .Net sdk style, we have migrated Xamarin.iOS (native) project into sdk style project (Microsoft.NET.Sdk).

Project successfully debug and run even debug build are archived successfully but failed to generate Ad-Hoc | Release Build. Bundle signing configuration is also set to Release Mode with ad-hoc provisioning profile but still error to archieve a build.

Best Regards,

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,349 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 31,166 Reputation points Microsoft Vendor
    2024-09-09T07:21:07.14+00:00

    Hello,

    I want to double-check that your project is a .net-iOS project or a Xamarin.iOS project. You mentioned that you have migrated to .NET SDK style.

    From the screenshot, it looks like you are using VS for Mac, right? If so, you can refer to the following:

    Please connect your physical iOS device with your Mac, use the Debug Target drop-down to select your device. (or select Generic 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.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.