It says the app builds successfully, and then the simulator comes up on the google or ios homescreen. This doesn't seem to happen in any of the tutorials I have watched, and no one seems to address it that I can find. They just say to reinstall or update, which I have done. This happens right at the start with the example code and beyond. I have tried it across 3 devices on a fully updated VS community 2022 using Macbook Pro M1, Windows 10 laptop and Windows 11 desktop, all to more or less the same result. There's never any 'errors' present, and it always says the build succeeded in the console. it just never behaves properly or how the tutorials do. Again, this isn't just with code I have written, it's also the example project Maui starts you with.
Loading
Bhavesh RavalPosted Oct 21, 2023, 8:11 AM
If you're using .NET MAUI and the simulators are running but the app isn't starting, it could be due to various reasons. Here are some steps to troubleshoot the issue:
Check for Errors: Look for any error messages or warnings in the Visual Studio output window. This can provide valuable information about what's going wrong.
Rebuild the Solution: Sometimes, a clean rebuild can resolve issues. Right-click on your solution in Visual Studio and select "Rebuild."
Check Debug Configuration: Ensure that you are running the app in the correct configuration. Make sure the build configuration is set to "Debug" and not "Release."
Set the Start Project: Confirm that the correct project within your solution is set as the startup project. Right-click on the project you want to start and select "Set as StartUp Project."
Update .NET MAUI and Visual Studio: Ensure that you are using the latest versions of .NET MAUI and Visual Studio. Sometimes, updating to the latest versions can resolve compatibility issues.
Check for Dependencies: Make sure all the required dependencies and NuGet packages are correctly installed in your project.
Check App Initialization: Review the app initialization code in your .NET MAUI project. There may be issues with how your app is starting or any exceptions that are preventing it from running.
Device/Simulator Selection: Verify that you have selected the correct simulator or device to run the app on. Ensure that the simulator/device is correctly set in your project's run configuration.
Try a Different Simulator/Device: If one simulator/device isn't working, try a different one. Sometimes, there can be issues specific to a particular simulator.