I want to add some features to my UWP app. Optional packages seem to be a way for that. So I moved the ViewModel class and the Page class to the optional package and put them into the optional package's namespace. After installing the optional package I want to show the moved Page, but I always get the following error:
Windows.UI.Xaml.Markup.XamlParseException
HResult=0x802B000A
Message=XAML parsing failed.
Source=System.Private.Interop
StackTrace:
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32 hr, RuntimeTypeHandle typeHnd) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgMarshal.cs:line 1189
at __Interop.ComCallHelpers.Call(__ComObject __this, RuntimeTypeHandle __typeHnd, Int32 __targetIndex, Void* arg0, Void* arg1, Int32 arg2)
at Windows.UI.Xaml.IApplicationStatics__Impl.Stubs.LoadComponent(__ComObject __this, Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at Windows.UI.Xaml.Application.__Factory_Windows_UI_Xaml__IApplicationStatics_LoadComponent(String typeName, Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at <my classes>
How can I load and show my optional package's Page?