Hello,
It is caused by you what to quit your application on the Shell initial method.
It is not possible to exit the shell initialization through the Quit method.
You could add your code into OnAppearing
method of your MainPage
to implement this feature:
protected override void OnAppearing()
{
base.OnAppearing();
try
{
Uri uri = new Uri("https://www.microsoft.com");
Browser.Default.OpenAsync(uri, BrowserLaunchMode.External);
Application.Current.Quit();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Best Regards,
Alec Liu.
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.