skip to Main Content

Application upgraded using Microsoft’s auto upgrade command line tool.

Some code fixes, and the code builds successfully.

Visual Studio however does not show me any way to debug my app.

When trying to click on Debug anyway, a random Android Emulator from my list(which is not showing currently)

Will open, but deployment will fail without specifying the reason.

Has anyone managed to upgrade an existing Xamarin.Forms project to Maui?

2

Answers


  1. Chosen as BEST ANSWER

    I managed to make VS recognize the Android project in my converted solution.

    I added the <SingleProject>true</SingleProject> property into my Android project's .csproj file under the first/main property group, closed VS, deleted Bin, Obj, .vs folders.

    After starting VS again , I rebuilt and VS allowed me to debug on selected .net targets like a single project Maui solution.

    This is very strange that it works, since this solution is made of 3 project like in a Xamarin.Forms solution, so it doesn't make since that adding this property solves the issue, but there you go.


    1. Delete .bin and .obj folders. Delete solution’s hidden .vs folder. Build. Does it show debug option now?
    2. Try restarting VS (after the successful build). Now work?
    3. If not, Create a new project using Maui template.
    4. Use solution / manage all nugets to add nugets used by your project.
    5. Copy all your source files into that new project.
    6. Project / "Add existing items": all those source files.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search