To run and test your .NET MAUI app, you need to follow these steps based on the target platform:
For iOS:
- Set the Debug Target: In Visual Studio Code, ensure that the Debug Target is set to a specific iOS simulator. You can do this by pressing the curly brackets symbol { } in the status bar or by using the command palette with .NET MAUI: Pick iOS Device.
- Build and Run: Press F5 or click the Run button in the upper right corner of Visual Studio Code. If prompted, select C# as the debugger.
- Observe the App: Once the app is running in the simulator, you can interact with it and check its functionality.
For Android:
- Set the Debug Target: In Visual Studio, select the Debug Target dropdown and choose Android Emulators. Then select your desired emulator device.
- Run the App: Press F5 or click the play button at the top of Visual Studio to run the app.
- Test the App: The Android app window will appear in the emulator, allowing you to test its features.
For Desktop:
- Set the Debug Target: In Visual Studio, set the Debug Target to the appropriate framework (e.g., net7.0-windows).
- Run the App: Press F5 or select the play button to run the application. The desktop application window will appear automatically.
- Sign In and Test: If applicable, select the Sign In button to test the authentication process.
By following these steps, you can effectively run and test your .NET MAUI application across different platforms.