Skip to content

[Bug]: --devtools on for a non-WinUI build-output folder fails with a FrameworkUdk error #1315

Open

Description

Describe the bug

winapp run <build-output-folder> --devtools on on an app that isn't WinUI 3 (for example WPF or Electron build output) starts the app, then exits 1 with an error that doesn't explain the real problem:

Could not locate Microsoft.Internal.FrameworkUdk.dll (Windows App Runtime). Set WINAPP_DEVTOOLS_FRAMEWORKUDK to its full path. ...

A WPF project gets a clear refusal before launch ("DevTools requires WinUI 3; 'X.csproj' is a WPF-only project ..."). A build-output folder doesn't. Related: #1215.

To Reproduce

dotnet new wpf -n BBWpf; cd BBWpf; dotnet build
cd bin\Debug\net10.0-windows
winapp manifest generate . --executable "$PWD\BBWpf.exe"
winapp run . --devtools on --json

Actual: the app starts, and winapp exits 1 with the FrameworkUdk error in the JSON Error field.

Expected behavior

Say that the folder isn't a WinUI 3 app and that DevTools requires WinUI 3, the same as the project-mode message. Ideally check this before launching. Folders without Microsoft.WinUI.dll, Microsoft.UI.Xaml.dll or any .xbf file can't be WinUI 3 apps.

OS Version and details

Windows 11 Insider Preview build 26721, ARM64. winapp 0.7.2-prerelease.156 (main cf21887).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions