Home
%3CLINGO-SUB%20id%3D%22lingo-sub-376330%22%20slang%3D%22en-US%22%3EUsing%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-376330%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20you%20probably%20know%2C%20the%20AppConsult%20team%20has%20a%20strong%20focus%20on%20Windows%20app%20modernization.%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fxaml-platform%2Fxaml-host-controls%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EXAML%20Islands%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20one%20of%20the%20main%20technologies%20we're%20working%20with%20and%20with%20my%20buddy%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fsbovo%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESebastien%20Bovo%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewe%20have%20delivered%20a%20full%20workshop%20about%20it%20at%20Microsoft%20Ready%2C%20an%20internal%20Microsoft%20event%20which%20gathers%20more%20than%205000%20engineers%20from%20all%20around%20the%20world.%3C%2FP%3E%0A%3CP%3EXAML%20Islands%20is%20one%20of%20the%20technologies%20which%20allows%20to%20modernize%20your%20existing%20WPF%20and%20Windows%20Forms%20applications%20without%20rewriting%20them%20from%20scratch.%20You%20can%20embed%2C%20in%20fact%2C%20controls%20from%20the%20Universal%20Windows%20Platform%20and%2C%20as%20such%2C%20bring%20a%20bit%20of%20Fluent%20design%2C%20touch%20and%20ink%20support%20also%20to%20your%20Win32%20applications.%3C%2FP%3E%0A%3CP%3EThe%20APIs%20which%20make%20XAML%20Islands%20possible%20are%20included%20in%20Windows%2010%2C%20but%20to%20make%20easier%20to%20consume%20them%20the%20Windows%20team%20has%20built%20a%20set%20of%20controls%20which%20have%20been%20included%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fcommunitytoolkit%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Community%20Toolkit%3C%2FA%3E.%20This%20way%2C%20embeedding%20a%20UWP%20control%20in%20your%20Win32%20application%20is%20easy%20as%20dragging%20and%20dropping%20a%20control%20inside%20your%20window%20and%20set%20some%20properties.%3C%2FP%3E%0A%3CP%3EXAML%20Island%20support%20has%20been%20added%20in%20preview%20in%20Windows%201809%2C%20but%20it's%20on%20Windows%2010%2019H1%20(the%20next%20major%20Windows%20update)%20where%20it%20will%20reach%20its%20full%20potential.%20As%20a%20consequence%2C%20I've%20finally%20decided%20to%20make%20the%20switch%20and%20I%20moved%20my%20Surface%20Pro%20to%20the%20Windows%20Insider%20program.%20As%20such%2C%20at%20the%20moment%20of%20writing%2C%20I'm%20now%20running%20Windows%2010%2018358.1.%3C%2FP%3E%0A%3CP%3EHowever%2C%20when%20I%20launched%20the%20application%20me%20and%20Sebastien%20have%20built%20for%20the%20XAML%20Island%20lab%2C%20it%20started%20to%20crash%20when%20I%20was%20opening%20one%20of%20the%20windows%20which%20hosts%20a%20UWP%20control.%20The%20error%20was%20the%20following%20one%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%20id%3D%22pragma-line-11%22%3E%0A%3CP%3ESystem.Exception%3A%20'Catastrophic%20failure%20WindowsXamlManager%20and%20DesktopWindowXamlSource%20are%20supported%20for%20apps%20targeting%20Windows%20version%2010.0.18226.0%20and%20later.%20Please%20check%20either%20the%20application%20manifest%20or%20package%20manifest%20and%20ensure%20the%20MaxTestedVersion%20property%20is%20updated.'%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93546i47A582F7DCDB3857%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22exception.png%22%20title%3D%22exception.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20some%20investigations%20and%20with%20the%20help%20of%20my%20friend%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FAlexandreChohfi%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAlexandre%3C%2FA%3E%2C%20I've%20found%20two%20ways%20to%20solve%20this%20problem.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1483343165%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%20id%3D%22toc-hId-1506279391%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22msix-packaging%22%20id%3D%22toc-hId--1068813796%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%20id%3D%22toc-hId--1045877570%22%3EMSIX%20packaging%3C%2FH3%3E%0A%3CP%3EThe%20first%20way%20to%20solve%20this%20problem%20is%20to%20package%20the%20application%20as%20MSIX%20and%20use%2C%20as%20target%20SDK%2C%20the%2019H1%20one.%20This%20way%2C%20the%20application%20will%20be%20compiled%20with%20the%20newest%20version%20of%20the%20SDK%2C%20which%20includes%20support%20for%20all%20the%20latest%20XAML%20Island%20features%2C%20and%20the%20error%20will%20go%20away.%3C%2FP%3E%0A%3CP%3EAs%20first%20step%2C%20you%20have%20to%20go%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsoftware-download%2FwindowsinsiderpreviewSDK%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsoftware-download%2FwindowsinsiderpreviewSDK%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewebsite%2C%20login%20with%20a%20Microsoft%20Account%20enrolled%20in%20the%20Windows%20Insider%20program%20and%20click%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EGet%20SDK%20Insider%20Preview%3C%2FSTRONG%3E.%20At%20the%20time%20of%20writing%2C%20the%20most%20recent%20SDK%20is%2018351.%20Once%20the%20download%20is%20complete%2C%20double%20click%20on%20the%20ISO%20file%2C%20which%20will%20be%20mounted%20as%20a%20virtual%20drive.%20Open%20it%20in%20File%20Explorer%20and%20double%20click%20on%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EWinSDKSetup.exe%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efile%20to%20start%20the%20installation.%3C%2FP%3E%0A%3CP%3EOnce%20the%20setup%20is%20finished%2C%20open%20your%20WPF%20or%20Windows%20Forms%20solution%20in%20Visual%20Studio.%20Then%20right%20click%20on%20it%20in%20Solution%20Explorer%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%20-%26gt%3B%20New%20project%3C%2FSTRONG%3E.%20If%20you're%20using%20Visual%20Studio%202019%2C%20just%20type%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Epackaging%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20search%20box%20to%20find%20the%20Windows%20Application%20Packaging%20Project.%20If%20you're%20using%20Visual%20Studio%202017%2C%20instead%2C%20you%20will%20find%20under%20the%20category%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%23%20-%26gt%3B%20Windows%20Universal%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93547iB3C18A615974A467%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22packaging%20project.png%22%20title%3D%22packaging%20project.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAs%20first%20step%2C%20you%20will%20be%20asked%20which%20Windows%2010%20version%20you%20want%20to%20target.%20Make%20sure%20to%20choose%2C%20as%20Target%20version%2C%20the%20Insider%20SDK%20you%20have%20just%20installed%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20603px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93548i908AB5E62F5DED3B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22insider.png%22%20title%3D%22insider.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EOnce%20the%20project%20has%20been%20created%2C%20identify%20the%26nbsp%3B%3CSTRONG%3EApplications%3C%2FSTRONG%3E%26nbsp%3Bsection%20in%20Solution%20Explorer%20and%20right%20click%20on%20it.%20Choose%26nbsp%3B%3CSTRONG%3EAdd%20reference%3C%2FSTRONG%3E%3A%20Visual%20Studio%20will%20show%20the%20list%20of%20projects%20included%20in%20the%20solution.%20Choose%20the%20one%20which%20contains%20your%20WPF%20%2F%20Windows%20Forms%20application%20and%20press%20OK.%20Now%20your%20application%20has%20been%20packaged.%20If%20you%20set%20the%20new%20project%20as%20startup%20and%20you%20deploy%20it%2C%20you%20will%20actually%20launch%20the%20packaged%20version%20of%20your%20application%20inside%20the%20MSIX%20container.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20344px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93549i870164968AE41699%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22solution%20explorer.png%22%20title%3D%22solution%20explorer.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20now%20try%20to%20open%20a%20windows%20of%20your%20application%20which%20includes%20a%20XAML%20Island%20control%2C%20it%20will%20work%20just%20fine%20and%20you'll%20be%20able%20to%20see%20and%20interact%20with%20it.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-673996539%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%20id%3D%22toc-hId-696932765%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22add-an-application-manifest%22%20id%3D%22toc-hId--1878160422%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%20id%3D%22toc-hId--1855224196%22%3EAdd%20an%20application%20manifest%3C%2FH3%3E%0A%3CP%3EThe%20second%20option%20is%20to%20add%20an%20application%20manifest%20to%20your%20Win32%20application.%20This%20will%20allow%20to%20leverage%20XAML%20Islands%20without%20having%20to%20package%20your%20application%20as%20MSIX.%20But%20there's%20an%20advantage%20also%20in%20the%20MSIX%20scenario%3A%20you'll%20be%20able%2C%20in%20fact%2C%20to%20package%20your%20application%20but%20still%20target%201809%2C%20without%20having%20to%20install%20the%2019H1%20SDK%20and%20retarget%20the%20app.%3C%2FP%3E%0A%3CP%3ETo%20add%20an%20application%20manifest%2C%20right%20click%20on%20your%20WPF%20or%20Windows%20Forms%20project%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%20-%26gt%3B%20New%20item%3C%2FSTRONG%3E.%20Choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EXML%20File%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efrom%20the%20list%2C%20name%20it%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eapp.manifest%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20then%20copy%20and%20paste%20the%20following%20content%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-44%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-meta%22%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3Eassembly%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EmanifestVersion%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%221.0%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Exmlns%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22urn%3Aschemas-microsoft-com%3Aasm.v1%22%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3Ecompatibility%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Exmlns%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22urn%3Aschemas-microsoft-com%3Acompatibility.v1%22%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3Eapplication%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%0A%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-comment%22%3E%3C!--%20Windows%2010%20--%3E%3C%2FSPAN%3E%0A%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3Emaxversiontested%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EId%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%2210.0.18358.0%22%3C%2FSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%0A%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EsupportedOS%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EId%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22%7B8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a%7D%22%3C%2FSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%0A%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3Eapplication%3C%2FSPAN%3E%26gt%3B%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3Ecompatibility%3C%2FSPAN%3E%26gt%3B%0A%0A%3CSPAN%20class%3D%22hljs-tag%22%3Eassembly%3C%2FSPAN%3E%26gt%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Emaxversiontested%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eelement%20inside%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eapplication%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Enode%20must%20match%20the%20most%20recent%20available%20version%20of%20Windows%2010%2019H1.%20Ideally%2C%20once%2019H1%20will%20ship%2C%20it%20should%20include%20the%20final%20version%20number.%20For%20the%20moment%2C%20I've%20specified%20the%20most%20recent%20Insider%20build%20at%20the%20time%20of%20writing%2C%20which%20is%2018358.%3C%2FP%3E%0A%3CP%3EThe%20second%20step%20is%20to%20edit%20the%20.csproj%20to%20add%20a%20reference%20to%20the%20manifest%20file%20we%20have%20just%20added.%20We%20can%20do%20this%20through%20the%20visual%20editor.%20Right%20click%20on%20the%20project%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProperties%3C%2FSTRONG%3E%2C%20then%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EResources%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20type%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eapp.manifest%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EManifest%26nbsp%3B%3C%2FSTRONG%3Efield%2C%20as%20highlighted%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20828px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93551i18C8997D123CA849%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22appmanifest.png%22%20title%3D%22appmanifest.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20it!%20Now%20you%20launch%20your%20WPF%20or%20Windows%20Forms%20application%2C%20even%20not%20packaged%20as%20MSIX%2C%20and%20you%20should%20see%20the%20UWP%20controls%20being%20rendered%20just%20fine%2C%20wihout%20any%20other%20catastrophic%20failure%20%3D)%3C%2Fimg%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--135350087%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%20id%3D%22toc-hId--112413861%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22wrapping-up%22%20id%3D%22toc-hId-1607460248%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%20id%3D%22toc-hId-1630396474%22%3EWrapping%20up%3C%2FH3%3E%0A%3CP%3EIn%20this%20post%20we%20have%20seen%20how%20to%20fix%20the%20catastrophic%20failure%20exception%20that%20you%20may%20get%20if%20you%20have%20started%20to%20integrate%20XAML%20Island%20in%20your%20WPF%20and%20Windows%20Forms%20app%20on%20Windows%2010%201809%20and%20then%20you%20moved%20to%2019H1.%20If%20you%20want%20to%20take%20a%20deeper%20look%20to%20XAML%20Islands%2C%20the%20official%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwindows-toolkit%2FMicrosoft.Toolkit.Win32%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%20repository%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20a%20great%20starting%20point%2C%20since%20it%20contains%20many%20samples%20you%20can%20play%20with.%3C%2FP%3E%0A%3CP%3EHappy%20coding!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-390585%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-390585%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20and%20thanks%20for%20the%20feedback!%20Let%20me%20try%20to%20address%20your%20questions%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EPartially%20correct.%20XAML%20Islands%20has%20been%20introduced%20in%20Windows%201809%2C%20so%20it%20works%20also%20there.%20However%2C%20in%201809%20it%20has%20been%20released%20as%20a%20preview%20technology%20to%20allow%20developers%20start%20playing%20with%20it%2C%20but%20it%20isn't%20suggested%20to%20be%20used%20in%20production%20environments.%3C%2FLI%3E%0A%3CLI%3EXAML%20Islands%20will%20be%20out%20of%20preview%20in%2019H1%2C%20so%20very%20soon.%20I%20think%20nothing%20is%20blocking%20you%20to%20publish%20an%20application%20on%20the%20Store%20which%20uses%20XAML%20Islands%20right%20now.%20The%20only%20caveat%20is%20that%20you%20need%20to%20test%20it%20very%20well%20and%20make%20sure%20that%20the%20UWP%20controls%20you're%20using%20don't%20introduce%20any%20kind%20of%26nbsp%3B%20instability%20in%20your%20apps.%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-390545%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-390545%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44595%22%20target%3D%22_blank%22%3E%40Matteo%20Pagani%3C%2FA%3E%26nbsp%3B-%20Thanks%20for%20this%20post.%20I've%20been%20following%20the%20work%20from%20the%20app%20consult%20team%20very%20closely%20as%20I%20love%20using%20the%20new%20technologies%20you%20all%20come%20out%20with%20for%20UWP.%20I%20ran%20into%20this%20error%20after%20upgrading%20my%20Windows%20to%2019H1%20and%20I've%20since%20halted%20development%20on%20upgrading%20my%20desktop%20bridge%20app(s)%20to%20use%20XAML%20Islands%20since%20I've%20had%20numerous%20issues%20using%20the%20preview%20and%20it%20didn't%20seem%20worth%20it%20to%20continue%20developing%20for%20an%20OS%20release%20version%20that%20most%20of%20my%20users%20will%20not%20use%20for%20a%20while.%20However%2C%20I'm%20very%20glad%20to%20see%20work%20is%20still%20being%20put%20into%20these%20technologies.%20I%20have%20a%20couple%20questions%20which%20may%20affect%20the%20priority%20of%20the%20work%20in%20my%20apps%20and%20maybe%20you%20can%20answer%20them%20for%20me%3A%3CBR%20%2F%3E1.%20If%20I'm%20required%20to%20also%20upgrade%20my%20package%20to%20build%2018351%2C%20does%20that%20mean%20there%20will%20never%20be%20support%20for%20XAML%20islands%20earlier%20than%20that%20build%20(like%20for%20OS%20version%201809)%3F%3CBR%20%2F%3E2.%20When%20is%20XAML%20island's%20anticipated%20release%20date%20and%20when%20can%20I%20expect%20to%20be%20publishing%20apps%20with%20XAML%20islands%20to%20the%20Windows%20Store%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1159201%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1159201%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Eric%2C%3C%2FP%3E%0A%3CP%3Ehere%20is%20my%20feedback%20to%20your%20questions%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%26nbsp%3BYes%2C%20that's%20correct.%20The%20app%20manifest%20is%20an%20application%20concept%2C%20not%20a%20user%20control%20one.%20The%20user%20control%20will%20leverage%20the%20minimum%20and%20maximum%20version%20that%20you%20have%20specified%20for%20the%20main%20application.%3C%2FLI%3E%0A%3CLI%3EThis%20blog%20post%20has%20been%20written%20before%20Windows%2010%201903%20was%20officially%20released.%20As%20such%2C%20the%20build%20number%20in%20the%20manifest%20was%20the%20most%20recent%20one%20related%20to%20Windows%201903%20available%20at%20that%20time.%20Now%20that%20Windows%2010%201903%20is%20out%2C%20you%20can%20safely%20use%20the%20final%20build%20number%2C%20which%20is%2018632.%20You%20don't%20have%20to%20increase%20it%20when%20new%20Windows%2010%20versions%20are%20released%2C%20you%20can%20stick%20to%2018362%20since%20it's%20the%20first%20public%20Windows%2010%20version%20to%20offer%20full%20support%20for%20XAML%20Islands.%3C%2FLI%3E%0A%3CLI%3EThe%20error%20you%20are%20seeing%20isn't%20an%20error%2C%20but%20a%20requirement%20to%20specify%20the%20minimum%20OS%20version%20since%20version%20earlier%20than%20Windows%2010%201903%20don't%20offer%20XAML%20Islands%20support.%20Setting%20the%20minimum%20supported%20Windows%2010%20version%20(either%20via%20manifest%20or%20MSIX%20packaging)%20will%20always%20be%20a%20requirement.%20Things%20eventually%20might%20change%20with%20the%20release%20of%20WinUI%203.0%2C%20which%20will%20offer%20XAML%20Islands%20supports%20to%20older%20versions%20of%20Windows%2010.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EI%20hope%20it%20helps!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1158978%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1158978%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Matteo%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20few%20questions.%20I%20try%20xaml%20Island%20and%20got%20error%3A%26nbsp%3B%20%22Catastrophic%20failure.%20WindowsXamlManager%20and%20DesktopWindowXamlSource%20are%20supported%20for%20apps%20targeting%20Windows%20version%2010.0.18226.0%20and%20later.%20Please%20check%20either%20the%20application%20manifest...%22%20in%20xaml%20editor%20for%20%22MapControl%22.%20The%20offending%20%22MapControl%22%20is%20part%20of%20a%20UserControl%20which%20is%20inside%20a%20.net%20Core%20WPF%20class%20library.%20the%20class%20library%20is%20referenced%20by%20a%20.net%20Core%20WPF%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQ1%20-%20I%20included%20the%20manifest%20into%20both%20(Class%20library%20and%20app)%20but%20I%20feel%20it%20is%20only%20required%20into%20the%20app%20because%20the%20%22Manifest%22%20combo%20box%20of%20my%20User%20control%20project%20is%20disabled.%20Why%20Microsoft%20let%20me%20enter%20a%20Manifest%20into%20a%20UserControl%20if%20it%20is%20not%20required.%20If%20it%20is%20required%2C%20which%20seems%20normal%20in%20order%20for%20the%20UserControl%20to%20validate%20that%20it%20has%20the%20minimum%20requirement%2C%20then%20why%20the%20Manifest%20Combo%20box%20of%20my%20UserControl%20project%20property%20is%20disabled%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQ2%20-%20You%20seems%20to%20say%20that%20we%20have%20to%20put%20the%20latest%20version%20(latest%20build)%20of%20windows%20version%20into%20the%20manifest.%20I%20don't%20understand%20why%20it%20is%20not%20the%20minimum%20supported%20version%3F%20Why%20it%20is%20the%20maximum%20version%3F%20You%20seems%20to%20say%20that%20we%20have%20to%20write%20the%20latest%20version%20of%20a%20version%20of%20Windows%20but%20how%20does%20it%20stay%20valid%20when%20Windows%20version%20change%20(new%20patches%20for%20examples)%3F%20We%20always%20have%20to%20update%20that%20version%20number%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQ3%20-%20We%20are%20in%20february%202020%20and%20I%20still%20have%20the%20error.%20Nothing%20seems%20to%20have%20evolved%20since%20your%20post%20because%20I%20have%20the%20exact%20same%20error.%20Microsoft%20pushes%20developers%20to%20use%20.Net%20Core%20but%20xaml%20Island%20seems%20the%20only%20way%20to%20gat%20advantages%20of%20recent%20developement%26nbsp%3B%20related%20to%20UWP%20like%20SVG%2C%20Win2D%2C%20MapControl%20and%20so%20on.%20You%20also%20mention%20that%20is%20is%20not%20suggested%20to%20use%20that%20in%20prodution.%20So%20what%20should%20I%20understand%3F%20Should%20we%20use%20xaml%20Island%20or%20not%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EEric%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1160261%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1160261%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20a%20lot%20Mateo%2C%20it%20really%20helps.%20But%20I%20still%20have%20few%20interrogations%2Fproblems%20that%20you%20seems%20to%20be%20the%20key%20to%20the%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20followed%20Thomas%20Claudius%20Huber%20post%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.thomasclaudiushuber.com%2F2019%2F04%2F23%2Fnet-core-3-use-uwp-controls-in-wpf-with-xaml-islands%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.thomasclaudiushuber.com%2F2019%2F04%2F23%2Fnet-core-3-use-uwp-controls-in-wpf-with-xaml-islands%2F%3C%2FA%3E%20and%20video%20(PluralSight)%20of%20Olia%20Gavrysh%20-%20Building%20Modern%20.Net%20Desktop%20Apps%20with%20.NET%20Core%20and%20Windows%2010%3A%20DEVintersection%202019.%3C%2FP%3E%3CP%3ENote%3A%20Olia%20says%20at%20minute%2040%3A40%20%3A%20Minimum%20version%20of%20Windows%20talking%20about%20%22maxversiontested%22.%20Is%20this%20a%20minimum%20or%20maximum%20version%20(one%20is%20the%20opposite%20of%20the%20other)%3F%20I%20used%26nbsp%3B%3CMAXVERSIONTESTED%20id%3D%22%26quot%3B10.0.18362.0%26quot%3B%2F%22%3E%20but%20the%20XamlDesigner%20message%20say%26nbsp%3B0.0.18226.0.%20Its%20really%20comfusing%20(like%20you%20and%20Olia%20said%2C%2018363%20seems%20to%20be%20the%20good%20one%2C%20but%20why%20not%20changing%20the%20message%20-%20it's%20nice%20to%20show%20a%20real%20case%20but%20perhaps%20it's%20better%20to%20put%20%22xxxxx%22%20instead%20of%20%2218226%22%20%3F%3F%3F).%3C%2FMAXVERSIONTESTED%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhile%20compiling%2Frunning%20(not%20sure%20exactly%20when)%2C%20Visual%20Studio%20seems%20to%20add%20Microsoft.VCRTForwarders.140%20(brings%20beta%20version%20~1.0.2%20that%20we%20should%20update%20to%201.0.5)%20...%20How%20this%20package%20lands%20in%20my%20project%20and%20is%20this%20really%20necessary%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20everything%20was%20added%20like%20described%20by%20Thomas%20and%20Olia%20(and%20you)%2C%20I%20still%20got%20from%20XAML%20designer%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22Catastrophic%20failure%5Cr%5Cn%5Cr%5CnWindowsXamlManager%20and%20DesktopWindowXamlSource%20are%20supported%20for%20apps%20targeting%20Windows%20version%2010.0.18226.0%20and%20later.%20Please%20check%20either%20the%20application%20manifest...%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOK%2C%20although%20the%20designer%20say%20that%2C%20it%20compiled%20fine%20and%20worked%20fine%2C%20at%20least%20in%20appearance.%20Just%20in%20appearance%2C%20because%20I'm%20also%20not%20able%20to%20access%20%22MyMapControl%22%20from%20code%20behind%20although%20I%20set%20x%3AName%20%3D%20%22MyMapControl%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20as%20a%20side%20note%2C%20the%20designer%20does%20not%20really%20help%20if%20it%20says%20errors%20that%20do%20not%20exists.%20I%20Know%20it's%20like%20that%20for%20at%20least%2010%20years%20(Xaml%20Designer%20spitting%20lots%20of%20errors%20although%20everything%20compile%20fine)%20but%20this%20one%2C%20a%20new%20one%2C%20really%20does%20not%20help%20when%20we%20are%20trying%20new%20stuff.%20Can%20we%20expect%20Microsoft%20to%26nbsp%3B%20fix%20each%20and%20every%20error%20the%20XAML%20designer%20is%20showing%20by%20mistake%3F%20I%20can%20sent%20you%20samples%20of%20everything.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20why%20I%20can't%20acces%20the%20MapControl%3F%20In%2010%20years%2C%20that's%20the%20first%20time%20it%20does%20not%20works%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1160627%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1160627%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20a%20lot.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20answers%20are%20great%20and%20relly%20helpful.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20posted%20a%20stackoverflow%20question%20because%20I%20still%20have%202%20problems.%20Perhaps%20you%20can%20take%20a%20look%20if%20you%20have%20few%20minutes%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60121122%2Fxdg0062-catastrophic-failure-when-trying-to-use-uwp-controls-into-a-net-co%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F60121122%2Fxdg0062-catastrophic-failure-when-trying-to-use-uwp-controls-into-a-net-co%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20very%20quick%20feedback%20and%20nice%20answers.%3C%2FP%3E%3CP%3EEric%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1168766%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1168766%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Eric%2C%3C%2FP%3E%0A%3CP%3EI%20tried%20to%20reply%20on%20Stack%20Overflow%20but%2C%20unfortunately%2C%20I%20need%20some%20clarifications%20on%20your%20configuration%20and%20Stack%20Overflow%20doesn't%20allow%20that.%20Since%20I%20don't%20have%20enough%20reputation%2C%20it%20seems%20that%20I'm%20not%20allowed%20to%20ask%20for%20clarifications%20but%20only%20to%20provide%20direct%20answers.%20However%2C%20in%20this%20case%20I%20need%20additional%20info%20before%20helping%20you.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhich%20Windows%2010%20version%20you're%20running%20on%20your%20machine%3F%20Can%20you%20try%20if%20you%20get%20the%20same%20behavior%20with%20the%20sample%20app%20available%20at%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fqmatteoq%2FMCTSummit2020-MiddleEast%2Ftree%2Fmaster%2FModernWpfDemo%22%20rel%3D%22noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fgithub.com%2Fqmatteoq%2FMCTSummit2020-MiddleEast%2Ftree%2Fmaster%2FModernWpfDemo%3C%2FA%3E%3F%3C%2FP%3E%0A%3CP%3EThis%20is%20a%20demo%20project%20I've%20built%20which%20uses%20a%20MapControl%20as%20well%20and%2C%20on%20my%20machine%2C%20I'm%20not%20able%20to%20reproduce%20your%20problem.%20I%20don't%20get%20any%20error%20in%20the%20designer.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1170387%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XAML%20Islands%20on%20Windows%2010%2019H1%3A%20fixing%20the%20%22Catastrophic%20failure%22%20exception%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1170387%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Matteo%20for%20your%20feedback%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20try%20your%20code.%3C%2FP%3E%3CP%3E-%20I%20uncommented%20the%20MapControl%3C%2FP%3E%3CP%3E-%20Added%202%20nuget%20package%3A%20Microsoft.Toolkit.Wpf.UI.%26nbsp%3B%20%26nbsp%3B(Controls%20and%20Xamlhost)%3C%2FP%3E%3CP%3E-I%20got%20error%20MSB3270%2C%20I%20went%20to%20App%20properties%20and%20changed%20Platform%20Target%20from%20x86%20to%20AnyCpu.%26nbsp%3B%3C%2FP%3E%3CP%3E-%20I%20got%20another%20error%20where%20I%20switched%20my%20solution%20to%20debug%20in%20x64%20(with%20appropriate%20project)%3C%2FP%3E%3CP%3E-%20I%20now%20have%3A%3C%2FP%3E%3CP%3ESeverity%20Code%20Description%20Project%20File%20Line%20Suppression%20State%3CBR%20%2F%3EError%20MSB3270%20There%20was%20a%20mismatch%20between%20the%20processor%20architecture%20of%20the%20project%20being%20built%20%22AMD64%22%20and%20the%20processor%20architecture%20of%20the%20reference%20%22C%3A%5CPrj%5CSamples%5CUWP%5CMCTSummit2020-MiddleEast-master%5CModernWpfDemo%5CModernWpfDemo%5Cbin%5Cx86%5CDebug%5Cnetcoreapp3.1%5Cwin-x86%5CModernWpfDemo.dll%22%2C%20%22x86%22.%20This%20mismatch%20may%20cause%20runtime%20failures.%20Please%20consider%20changing%20the%20targeted%20processor%20architecture%20of%20your%20project%20through%20the%20Configuration%20Manager%20so%20as%20to%20align%20the%20processor%20architectures%20between%20your%20project%20and%20references%2C%20or%20take%20a%20dependency%20on%20references%20with%20a%20processor%20architecture%20that%20matches%20the%20targeted%20processor%20architecture%20of%20your%20project.%20ModernWpfDemo.Package%20C%3A%5CProgram%20Files%20(x86)%5CMicrosoft%20Visual%20Studio%5C2019%5CEnterprise%5CMSBuild%5CCurrent%5CBin%5CMicrosoft.Common.CurrentVersion.targets%202106%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESeverity%20Code%20Description%20Project%20File%20Line%20Suppression%20State%3CBR%20%2F%3EError%20NETSDK1032%20The%20RuntimeIdentifier%20platform%20'win-x86'%20and%20the%20PlatformTarget%20'x64'%20must%20be%20compatible.%20ModernWpfDemo%20C%3A%5CProgram%20Files%5Cdotnet%5Csdk%5C3.1.101%5CSdks%5CMicrosoft.NET.Sdk%5Ctargets%5CMicrosoft.NET.RuntimeIdentifierInference.targets%20151%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEverything%20is%20set%20to%20x64%20in%20project%20properties.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20to%20hack%20manually%20the%20ModernWpfDemo.csproj%20to%20swap%3C%2FP%3E%3CP%3Efrom%3A%26nbsp%3B%20%3C!--%3CRuntimeIdentifier%3Ewin-x86%3C%2FRuntimeIdentifier%3E--%3E%3C%2FP%3E%3CP%3ETo%3A%26nbsp%3B%20%3CRUNTIMEIDENTIFIER%3Ewin-x64%3C%2FRUNTIMEIDENTIFIER%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

As you probably know, the AppConsult team has a strong focus on Windows app modernization. XAML Islands is one of the main technologies we're working with and with my buddy Sebastien Bovo we have delivered a full workshop about it at Microsoft Ready, an internal Microsoft event which gathers more than 5000 engineers from all around the world.

XAML Islands is one of the technologies which allows to modernize your existing WPF and Windows Forms applications without rewriting them from scratch. You can embed, in fact, controls from the Universal Windows Platform and, as such, bring a bit of Fluent design, touch and ink support also to your Win32 applications.

The APIs which make XAML Islands possible are included in Windows 10, but to make easier to consume them the Windows team has built a set of controls which have been included in the Windows Community Toolkit. This way, embeedding a UWP control in your Win32 application is easy as dragging and dropping a control inside your window and set some properties.

XAML Island support has been added in preview in Windows 1809, but it's on Windows 10 19H1 (the next major Windows update) where it will reach its full potential. As a consequence, I've finally decided to make the switch and I moved my Surface Pro to the Windows Insider program. As such, at the moment of writing, I'm now running Windows 10 18358.1.

However, when I launched the application me and Sebastien have built for the XAML Island lab, it started to crash when I was opening one of the windows which hosts a UWP control. The error was the following one:

 

System.Exception: '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.'

exception.png

 

After some investigations and with the help of my friend Alexandre, I've found two ways to solve this problem.

 

MSIX packaging

The first way to solve this problem is to package the application as MSIX and use, as target SDK, the 19H1 one. This way, the application will be compiled with the newest version of the SDK, which includes support for all the latest XAML Island features, and the error will go away.

As first step, you have to go to the https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK website, login with a Microsoft Account enrolled in the Windows Insider program and click on Get SDK Insider Preview. At the time of writing, the most recent SDK is 18351. Once the download is complete, double click on the ISO file, which will be mounted as a virtual drive. Open it in File Explorer and double click on the WinSDKSetup.exe file to start the installation.

Once the setup is finished, open your WPF or Windows Forms solution in Visual Studio. Then right click on it in Solution Explorer and choose Add -> New project. If you're using Visual Studio 2019, just type packaging in the search box to find the Windows Application Packaging Project. If you're using Visual Studio 2017, instead, you will find under the category C# -> Windows Universal.

 

packaging project.png

 

As first step, you will be asked which Windows 10 version you want to target. Make sure to choose, as Target version, the Insider SDK you have just installed:

 

insider.png

 

Once the project has been created, identify the Applications section in Solution Explorer and right click on it. Choose Add reference: Visual Studio will show the list of projects included in the solution. Choose the one which contains your WPF / Windows Forms application and press OK. Now your application has been packaged. If you set the new project as startup and you deploy it, you will actually launch the packaged version of your application inside the MSIX container.

 

solution explorer.png

 

If you now try to open a windows of your application which includes a XAML Island control, it will work just fine and you'll be able to see and interact with it.

 

Add an application manifest

The second option is to add an application manifest to your Win32 application. This will allow to leverage XAML Islands without having to package your application as MSIX. But there's an advantage also in the MSIX scenario: you'll be able, in fact, to package your application but still target 1809, without having to install the 19H1 SDK and retarget the app.

To add an application manifest, right click on your WPF or Windows Forms project and choose Add -> New item. Choose XML File from the list, name it app.manifest and then copy and paste the following content:

 

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>

      <!-- Windows 10 -->
      <maxversiontested Id="10.0.18358.0"/>
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

    </application>
  </compatibility>

</assembly>

The maxversiontested element inside the application node must match the most recent available version of Windows 10 19H1. Ideally, once 19H1 will ship, it should include the final version number. For the moment, I've specified the most recent Insider build at the time of writing, which is 18358.

The second step is to edit the .csproj to add a reference to the manifest file we have just added. We can do this through the visual editor. Right click on the project and choose Properties, then in the Resources section type app.manifest in the Manifest field, as highlighted below:

 

appmanifest.png

 

That's it! Now you launch your WPF or Windows Forms application, even not packaged as MSIX, and you should see the UWP controls being rendered just fine, wihout any other catastrophic failure =)

 

Wrapping up

In this post we have seen how to fix the catastrophic failure exception that you may get if you have started to integrate XAML Island in your WPF and Windows Forms app on Windows 10 1809 and then you moved to 19H1. If you want to take a deeper look to XAML Islands, the official GitHub repository is a great starting point, since it contains many samples you can play with.

Happy coding!

18 Comments
Regular Visitor

@Matteo Pagani - Thanks for this post. I've been following the work from the app consult team very closely as I love using the new technologies you all come out with for UWP. I ran into this error after upgrading my Windows to 19H1 and I've since halted development on upgrading my desktop bridge app(s) to use XAML Islands since I've had numerous issues using the preview and it didn't seem worth it to continue developing for an OS release version that most of my users will not use for a while. However, I'm very glad to see work is still being put into these technologies. I have a couple questions which may affect the priority of the work in my apps and maybe you can answer them for me:
1. If I'm required to also upgrade my package to build 18351, does that mean there will never be support for XAML islands earlier than that build (like for OS version 1809)?
2. When is XAML island's anticipated release date and when can I expect to be publishing apps with XAML islands to the Windows Store?

Microsoft

Hello and thanks for the feedback! Let me try to address your questions:

 

  1. Partially correct. XAML Islands has been introduced in Windows 1809, so it works also there. However, in 1809 it has been released as a preview technology to allow developers start playing with it, but it isn't suggested to be used in production environments.
  2. XAML Islands will be out of preview in 19H1, so very soon. I think nothing is blocking you to publish an application on the Store which uses XAML Islands right now. The only caveat is that you need to test it very well and make sure that the UWP controls you're using don't introduce any kind of  instability in your apps.
Frequent Visitor

Hi Matteo, 

 

I have few questions. I try xaml Island and got error:  "Catastrophic failure. WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later. Please check either the application manifest..." in xaml editor for "MapControl". The offending "MapControl" is part of a UserControl which is inside a .net Core WPF class library. the class library is referenced by a .net Core WPF application.

 

Q1 - I included the manifest into both (Class library and app) but I feel it is only required into the app because the "Manifest" combo box of my User control project is disabled. Why Microsoft let me enter a Manifest into a UserControl if it is not required. If it is required, which seems normal in order for the UserControl to validate that it has the minimum requirement, then why the Manifest Combo box of my UserControl project property is disabled? 

 

Q2 - You seems to say that we have to put the latest version (latest build) of windows version into the manifest. I don't understand why it is not the minimum supported version? Why it is the maximum version? You seems to say that we have to write the latest version of a version of Windows but how does it stay valid when Windows version change (new patches for examples)? We always have to update that version number?

 

Q3 - We are in february 2020 and I still have the error. Nothing seems to have evolved since your post because I have the exact same error. Microsoft pushes developers to use .Net Core but xaml Island seems the only way to gat advantages of recent developement  related to UWP like SVG, Win2D, MapControl and so on. You also mention that is is not suggested to use that in prodution. So what should I understand? Should we use xaml Island or not?

 

Thanks,

Eric

 

 

Microsoft

Hello Eric,

here is my feedback to your questions:

 

  1.  Yes, that's correct. The app manifest is an application concept, not a user control one. The user control will leverage the minimum and maximum version that you have specified for the main application.
  2. This blog post has been written before Windows 10 1903 was officially released. As such, the build number in the manifest was the most recent one related to Windows 1903 available at that time. Now that Windows 10 1903 is out, you can safely use the final build number, which is 18632. You don't have to increase it when new Windows 10 versions are released, you can stick to 18362 since it's the first public Windows 10 version to offer full support for XAML Islands.
  3. The error you are seeing isn't an error, but a requirement to specify the minimum OS version since version earlier than Windows 10 1903 don't offer XAML Islands support. Setting the minimum supported Windows 10 version (either via manifest or MSIX packaging) will always be a requirement. Things eventually might change with the release of WinUI 3.0, which will offer XAML Islands supports to older versions of Windows 10.

I hope it helps!

Frequent Visitor

Thanks a lot Mateo, it really helps. But I still have few interrogations/problems that you seems to be the key to the solution.


I followed Thomas Claudius Huber post: https://www.thomasclaudiushuber.com/2019/04/23/net-core-3-use-uwp-controls-in-wpf-with-xaml-islands/ and video (PluralSight) of Olia Gavrysh - Building Modern .Net Desktop Apps with .NET Core and Windows 10: DEVintersection 2019.

Note: Olia says at minute 40:40 : Minimum version of Windows talking about "maxversiontested". Is this a minimum or maximum version (one is the opposite of the other)? Does Microsoft will fix that?

 

I used <maxversiontested Id ="10.0.18362.0"/> but the XamlDesigner message says in the error message "0.0.18226.0". It's really comfusing, it would be nice the remove the ambiguity.

 

After everything was added like described by Thomas and Olia (and you), I still got the error from XAML designer:

"Catastrophic failure\r\n\r\nWindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later. Please check either the application manifest..."

 

OK, although the designer say that, it compiled fine and worked fine, at least in appearance. Just in appearance, because I'm also not able to access "MyMapControl" from code behind although I set x:Name = "MyMapControl".

 

Also, as a side note, the designer does not really help if it says errors that do not exists. I Know it's like that for at least 10 years (Xaml Designer, in some circumstance, show some false errors although everything compile fine) but this one, a new one, really does not help when we are trying new stuff. Can we expect Microsoft to fix the Xaml Designer in order to show real errors? I can sent you samples of many types of false errors.

 

Also, I can't access the MapControl from code behind. Do you have any idea why?

Frequent Visitor

Thanks a lot.

 

Your answers are great and relly helpful. 

 

I posted a stackoverflow question because I still have 2 problems. Perhaps you can take a look if you have few minutes?

 

 https://stackoverflow.com/questions/60121122/xdg0062-catastrophic-failure-when-trying-to-use-uwp-con...

 

Thanks for your very quick feedback and nice answers.

Eric

Microsoft

Hello Eric,

I tried to reply on Stack Overflow but, unfortunately, I need some clarifications on your configuration and Stack Overflow doesn't allow that. Since I don't have enough reputation, it seems that I'm not allowed to ask for clarifications but only to provide direct answers. However, in this case I need additional info before helping you.

 

Which Windows 10 version you're running on your machine? Can you try if you get the same behavior with the sample app available at https://github.com/qmatteoq/MCTSummit2020-MiddleEast/tree/master/ModernWpfDemo?

This is a demo project I've built which uses a MapControl as well and, on my machine, I'm not able to reproduce your problem. I don't get any error in the designer.

 

Thanks!

Frequent Visitor

Thanks Matteo for your feedback,

 

I try your code.

- I uncommented the MapControl

- Added 2 nuget package: Microsoft.Toolkit.Wpf.UI.   (Controls and Xamlhost)

-I got error MSB3270, I went to App properties and changed Platform Target from x86 to AnyCpu. 

- I got another error where I switched my solution to debug in x64 (with appropriate project)

- I now have:

Severity Code Description Project File Line Suppression State
Error MSB3270 There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "C:\Prj\Samples\UWP\MCTSummit2020-MiddleEast-master\ModernWpfDemo\ModernWpfDemo\bin\x86\Debug\netcoreapp3.1\win-x86\ModernWpfDemo.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. ModernWpfDemo.Package C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2106

 

Or 

 

Severity Code Description Project File Line Suppression State
Error NETSDK1032 The RuntimeIdentifier platform 'win-x86' and the PlatformTarget 'x64' must be compatible. ModernWpfDemo C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets 151

 

Everything is set to x64 in project properties.

 

I had to hack manually the ModernWpfDemo.csproj to swap

from:  <!--<RuntimeIdentifier>win-x86</RuntimeIdentifier>-->

To:  <RuntimeIdentifier>win-x64</RuntimeIdentifier>

 

Now I have when I run the app:

+ $exception {"Could not load file or assembly 'Windows.Foundation.UniversalApiContract, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified."} System.Windows.Markup.XamlParseException

Microsoft

Hello,

I apologize but I have realized that the repository I have shared wasn't in a good shape :)

Can you try again to clone the master branch from https://github.com/qmatteoq/MCTSummit2020-MiddleEast then follow these steps:

 

  1. Open the solution ModernWpfDemo.sln inside the ModernWpfDemo folder
  2. Make sure that the ModernWpfDemo project is the startup one (not the ModernWpfDemo.Package one)
  3. Choose x86 o x64 as CPU architecture.
  4. Press F5 and launch the debug.

Can you also share which is the Windows 10 build you're running on your machine?

 

I'm looking forward to your feedback.

Kind regards

Frequent Visitor

Thanks Matteo,

 

Result of compilation:

 

Severity Code Description Project File Line Suppression State
Warning Because your app is being built as AnyCPU no Microsoft.VCRTForwarders.140 DLLs were copied to your ouput folder. Microsoft.VCRTForwarders.140 only supports x86 or x64 applications due to a C++ Runtime dependency. Please change your app project architecture to x86 or x64 in the Configuration Manager. ModernWpfDemo C:\Users\cn1629\.nuget\packages\microsoft.vcrtforwarders.140\1.0.2-rc\build\netcoreapp2.0\Microsoft.VCRTForwarders.140.targets 33

 

Severity Code Description Project File Line Suppression State
Warning 81010002 Unrecognized Element "maxversiontested" in namespace "urn:schemas-microsoft-com:compatibility.v1". ModernWpfDemo C:\Prj\Samples\UWP\MCTSummit2020-MiddleEast-master 2\MCTSummit2020-MiddleEast-master\ModernWpfDemo\ModernWpfDemo\obj\AnyCPU\Debug\netcoreapp3.1\Manifests\app.manifest 1

 

Severity Code Description Project File Line Suppression State
Warning 81010002 Unrecognized Element "maxversiontested" in namespace "urn:schemas-microsoft-com:compatibility.v1". ModernWpfDemo C:\Prj\Samples\UWP\MCTSummit2020-MiddleEast-master 2\MCTSummit2020-MiddleEast-master\ModernWpfDemo\ModernWpfDemo\app.manifest 1

 

Severity Code Description Project File Line Suppression State
Error MSB3270 There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "C:\Prj\Samples\UWP\MCTSummit2020-MiddleEast-master 2\MCTSummit2020-MiddleEast-master\ModernWpfDemo\ModernWpfDemo\bin\Debug\netcoreapp3.1\win-x86\ModernWpfDemo.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. ModernWpfDemo.Package C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2106

 

I wonder if Microsoft employees could have something that is not included in Visual Studio installation?

 

I have latest Visual Studio version and Windows 10 v1909. My desktop Windows version was initially installed in french (not my choice).

 

Eric

Microsoft

Ok this problem is happening because the WPF project is configured to support only the x86 runtime. You have two options:

  • Compile for x64
  • Do a pull from GitHub. I have updated the project to support both x86 and x64.

Let me know if this works for you!

Frequent Visitor

Thanks Matteo,

 

It works fine. But I still have the Catastrophic failure in XAML editor.

FYI: There is many other XAML errors in the XAML Designer of Visual Studio since at least 2012. I reported them in Microsoft Connect but nothing happen.

 

EricOuellet_0-1581612370364.png

 

Microsoft

It seems it might be something specific to your configuration, because on my machines I don't see the catastrophic errors. Can you open an issue with the feedback tool integrated in Visual Studio and share me with the ID / link?

I will make sure that someone from the VS team takes a look at that.

 

Thanks!

Frequent Visitor

Thanks so much!

 

I reported a problem from Help-Send Feedback-Report a problem: "Catastrophic failure..." using UWP-MapControl into .Net-Core app with UWP

 

It is under my name: "Eric Ouellet". I just received an email with this link: https://developercommunity.visualstudio.com/content/problem/917596/catastrophic-failure-using-uwp-ma...

 

Thanks so much for your help. 

 

Eric

Microsoft

If you go back to the Feedback section, you should be able to see a list of all the feedbacks you have opened. You can click on them and go to the corresponding webpage. That's the link I'm looking for!

 

Thanks!

Frequent Visitor

I think you write me while I was modifying my answer. I inserted the link: https://developercommunity.visualstudio.com/content/problem/917596/catastrophic-failure-using-uwp-ma...

 

I received the link in an email few minutes after I created the bug report. 

If I go to "Help-Send feedback-Report a problem", I can see there is links but there is no way to copy them.

Is the previous link ok?

 

Frequent Visitor

   

Frequent Visitor

After many errors from myself, I finally got the exact same behavior with your code than my own code.

- I would say that everything appears to be the same.

- It sounds like an external dependency is the problem... How to know?