OK, I think I must be short of coffee this morning. I have this export
Partial Public Class MainPage
Where the explicit type was added because of this failure, it happens whether or not that line is there
And this import and usage:
Partial Public Class App
Public Sub New()
Public _mainPage As TestApplication.MainPage
Public _businessServiceClassFactory As IEnumerable(Of Lazy(Of Contracts.IBusinessServiceClassFactory))
Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
If _mainPage Is Nothing Then
Me.RootVisual = New TestApplication.MainPage
'Throw New InvalidOperationException("Main page not discovered")
Me.RootVisual = _mainPage
And, the Main page is found and loaded when used explicitly so there are no xaml errors confusing things.
The MainPage import is not fulfilled.
MainPage has not MEF imports so it seems that it can't be a stable composition problem although it feels like one. Also, there is no composition metadata to confuse things. It's just a dirt simple sample.
So, does anyone see what I'm missing?