Visual studio 2022 Maui project unable to compile for .net 9.0-ios target

Ryan Lee 25 Reputation points
2025-02-02T07:27:26.12+00:00

Hi,

I am trying to deploy a test app to iPhone from windows visual studio but getting the following error when trying to compile.

The specified network password is not correct.

I have completed the automatic provisioning :

User's image

I obviously have no problem compiling for android emulator.

I have tried removing the folder AppData\Local\Xamarin, removing bin and ojb folders, relaunching the app, and going through adding apple account again, confirmed there is at least one valid certificate in the list of chains.

Can someone please advise if there is anything else I can try to do?

Thanks

Ryan.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,916 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Andrew Taylor-Brook 0 Reputation points
    2025-02-07T11:31:21.79+00:00

    OK, i can now reproduce the issue and also work around it

    Steps for me to reproduce the issue :

    1. Open VS
    2. Connect iPhone (so it shows an available local device)
    3. Build project
    4. Debug to iPhone (Succeeds)
    5. Stop debugging
    6. Modify .csproj file in any way (e.g. just add some whitespace in) and save
    7. Debug to iPhone (don't explicitly build)
    8. Error about password appears.
    9. Build the project
    10. Debug to iPhone (Succeeds)

    So the main issue seems to be if the csproj file changes in some way but you don't build the project, the error appears until you do another build.


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.