Skip to content

[BUG] After launching the maui app and then clicking the "Restart" button, the maui appp does not restart #1951

@Jay-57blocks

Description

@Jay-57blocks

Describe the Issue

Hi,

I'm having an issue where I can run the Maui app using F5, but when the Restart button is clicked, the app doesn't restart as expected!

1,F5 launches the app and the terminal outputs:

Executing task: dotnet build -t:Run -p:Configuration=Debug -f net8.0-android -p:AdbTarget=-s%20R58X70XCJSR -p:AndroidAttachDebugger=true -p:AndroidSdbTargetPort=51309 -p:AndroidSdbHostPort=51309 -p:CustomAfterMicrosoftCSharpTargets="/Users/57block/.vscode/extensions/ms-dotnettools.dotnet-maui-1.9.21-darwin-arm64/dist/resources/Custom.After.Microsoft.CSharp.targets" -p:MauiVSCodeBuildOutputFile="/var/folders/4m/vj4hflln1rg1zsdhp0zxccmr0000gp/T/dotnet-maui/maui-vsc-59003e38-4016-46f4-8a5c-271c043473aa.json" -p:AndroidSdkDirectory="/Users/57block/Library/Android/sdk" -p:JavaSdkDirectory="/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home" -p:XamlTools="/Users/57block/.vscode/extensions/ms-dotnettools.csharp-2.72.34-darwin-arm64/.xamlTools" /Users/57block/Documents/TWE/unmc/src/UNMC/UNMC/UNMC/UNMC.csproj 

  Determining projects to restore...
    Starting Debugger on 127.0.0.1:51309
  Start sdb then run the following command
    connect 127.0.0.1 51309
      

Build succeeded.
    6 Warning(s)
    0 Error(s)

2,Clicking the Restart button, the app exited and the terminal output:
Image

 *  Executing task: dotnet build -t:Build -p:Configuration=Debug -f net8.0-android -p:AndroidSdkDirectory="/Users/57block/Library/Android/sdk" -p:JavaSdkDirectory="/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home" /Users/57block/Documents/TWE/unmc/src/UNMC/UNMC/UNMC/UNMC.csproj 

  Determining projects to restore...
Build succeeded.

    86 Warning(s)
    0 Error(s)

Time Elapsed 00:00:37.67

Steps To Reproduce

I can reproduce the problem every time on my computer with Vscode, but it doesn't happen with Visual Studio 2022

I recorded a video, check it out
https://youtu.be/qOmPQHOAWWE

Expected Behavior

I was expecting to restart the app by clicking on the Restart button, I remember it worked fine in the old .NET MAUI vscode extension and ,net version, after upgrading this problem has appeared and the possible reason is related to this. I hope this issue will be fixed soon, thanks.

Environment Information

Vscode Version: 1.99.3 (Universal)
ms-dotnettools.dotnet-maui 1.9.21

➜ ~ dotnet --info
.NET SDK:
 Version:           8.0.404
 Commit:            7b190310f2
 Workload version:  8.0.400-manifests.5ac61b9b
 MSBuild version:   17.11.9+a69bbaaf5

Runtime environment.
 OS Name:     Mac OS X
 OS Version:  14.6
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.404/

NET workloads installed: .
Configured to use loose manifests when installing new manifests.
 [ios]
   安装源文件: SDK 8.0.400
   清单版本:    18.0.8319/8.0.100
   清单路径:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios/18.0.8319/WorkloadManifest.json
   安装类型:        FileBased

 [maui]
   安装源文件: SDK 8.0.400
   清单版本:    8.0.100/8.0.100
   清单路径:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.100/WorkloadManifest.json
   安装类型:        FileBased


Host:
  Version:      8.0.15
  Architecture: arm64
  Commit:       50c4cb9fc3

.NET SDKs installed:
  6.0.421 [/usr/local/share/dotnet/sdk]
  6.0.422 [/usr/local/share/dotnet/sdk]
  6.0.425 [/usr/local/share/dotnet/sdk]
  7.0.315 [/usr/local/share/dotnet/sdk]
  7.0.316 [/usr/local/share/dotnet/sdk]
  7.0.317 [/usr/local/share/dotnet/sdk]
  8.0.204 [/usr/local/share/dotnet/sdk]
  8.0.404 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.29 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.33 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.29 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.33 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/local/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

➜ ~ dotnet workload list

已安装的工作负载 ID      清单版本                   安装源文件
---------------------------------------------------
ios              18.0.8319/8.0.100      SDK 8.0.400
maui             8.0.100/8.0.100        SDK 8.0.400

使用`dotnet workload search`查找要安装的其他工作负载。

| VS Bug 2455797

Metadata

Metadata

Assignees

Labels

area-mauibugSomething isn't workingtriagedThe issue has been triagedvs-syncAdd this label to synchronize the issue to AzDovs-syncdLinked to AzDO

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions