MicrosoftDocs / windows-dev-docs

Conceptual and overview content for developing Windows apps
Creative Commons Attribution 4.0 International
698 stars 1.21k forks source link

Need to set packaging project as StartUp Project #1656

Closed MikeHillberg closed 10 months ago

MikeHillberg commented 5 years ago

At the end of the Create a Package section, you must set that project as the startup project (right click on the project and select "Set as StartUp Project"). That way when you F5 you're running the packaged app. Otherwise, when you run the app you're getting the unpackaged WPF or WinForms app, and you get an exception like:

'The invocation of the constructor on type 'Microsoft.Toolkit.Wpf.UI.XamlHost.WindowsXamlHost' that matches the specified binding constraints threw an exception.'

And/or

Catastrophic failure. WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later. Please check either the application manifest or package manifest and ensure the MaxTestedVersion property is updated.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

stevewhims commented 10 months ago

Apologies for the five-year delay! This only reached me today. I've made the fix, and it should appear on the live site within the hour.

Sorry again! -Steve