Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly executing the Run command on the .NET MAUI App on the Windows platform in .NET 8 Preview 2 ends up in an error #13942

Open
1 task
egvijayanand opened this issue Mar 14, 2023 · 6 comments
Labels
area/desktop 🖥️ Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) blocked Work that is currently blocked external partner/winui WinUI / Project Reunion platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@egvijayanand
Copy link
Contributor

egvijayanand commented Mar 14, 2023

Description

Directly executing the Run command on the .NET MAUI App on the Windows platform as an Unpackaged App in .NET 8 Preview 2 ends up in an error.

Whereas building and then executing the project as a two-step action works fine.

The direct-run approach worked fine in Preview 1. A separate build step was not required in the earlier preview.

Steps to Reproduce

  • Create a new .NET MAUI App
  • Build the App targeting the Windows platform with the WindowsPackageType project property set to the value None to run it as Unpackaged App.

First, execute the Run command directly to visualize the error. Then issue the Build command and then the Run command again.

Run command:

dotnet build -f net8.0-windows10.0.19041.0 -p:WindowsPackageType=None -t:Run

Build command:

dotnet build -f net8.0-windows10.0.19041.0 -p:WindowsPackageType=None

Link to public reproduction project repository

Default template itself is suffice, no authored code

Version with bug

8.0 previews

Last version that worked well

8.0 previews

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.19041

Did you find any workaround?

First, build and then run the project.

Relevant log output

C:\Program Files\dotnet\sdk\8.0.100-preview.2.23157.25\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(932,5): error MSB3073: The command "E:\NET_8\Preview_2\MauiApp1\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\MauiApp1.exe " exited with code 3. [E:\NET_8\Preview_2\MauiApp1\MauiApp1.csproj::TargetFramework=net8.0-windows10.0.19041.0]

VS bug #1773325

Depends on

@mattleibow
Copy link
Member

Related to microsoft/WindowsAppSDK#2922

@mattleibow mattleibow added partner/winui WinUI / Project Reunion blocked Work that is currently blocked external platform/windows 🪟 labels Mar 15, 2023
@mattleibow mattleibow added this to the Backlog milestone Mar 15, 2023
@ghost
Copy link

ghost commented Mar 15, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@mattleibow
Copy link
Member

mattleibow commented Mar 15, 2023

Related to #5975

@mattleibow mattleibow marked this as a duplicate and then as not a duplicate of #5975 Mar 15, 2023
@Eilon Eilon added the area/desktop 🖥️ Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) label Mar 15, 2023
@egvijayanand
Copy link
Contributor Author

egvijayanand commented Mar 15, 2023

Ideally, the Run command should trigger a build if it is yet to be built or a change in the compilation artifacts.

Rather it simply attempts to run the executable. as from the log message, it is understood that it ends up with ... exited with code 3, which means that the ERROR_PATH_NOT_FOUND - The system cannot find the path specified.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Oct 10, 2023
@Zhanglirong-Winnie
Copy link
Collaborator

Visual Studio Enterprise 17.8.0 Preview 2.0. Can repro this issue.

@mattleibow
Copy link
Member

This is a known issue with .NET + Windows + Windows App SDK: microsoft/WindowsAppSDK#2922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/desktop 🖥️ Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) blocked Work that is currently blocked external partner/winui WinUI / Project Reunion platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants