Caliburn.Micro
Caliburn.Micro copied to clipboard
Universal App - UnitTestProject can't start if having references to project using Caliburn.Micro
Hi all, I'm trying Caliburn.Micro in Universal App. I have a main project using Caliburn.Micro and I would like to create a UnitTestProject to test some functions in that main project. Therefore in UnitTestProject I make a reference to main project. Since then the UnitTestProject can't start anymore, I always receive an error message "Cannot deserialize XBF metadata type list as 'CaliburnApplication' was not found in namespace 'Caliburn.Micro'".
How can I fix this error? I also prepared a small demo. The unit test in demo can't run anymore. http://hintdesk.com/Web/Tmp/CaliburnMicroTest.zip
This looks a lot like PrismLibrary/Prism#140 .
Adding the Bindable
attribute in to your repro gets the unit test running.
[Bindable]
public sealed partial class App
Not sure yet if adding the attribute to CaliburnApplication
will help yet, need to do some more testing.
Hoping this is resolved in upcoming version of Windows / Visual Studio.
I have the same error after upgrading caliburn.micro to 3.0.0 beta2 and change sdk behaviors with Microsoft.Xaml.Behaviors.Uwp.Managed. In my case, the problem resolved by restoring old Behaviors SDK and XAML.Interactions / XAML.Interactivity.
Hope this helps!
Adding Bindable
attribute to my App
class resolved this issue for me as well.
However, this attribute triggers a MyUnitTestProject\obj\x86\Debug\XamlTypeInfo.g.cs
file to be generated in a way that causes this exception to be thrown when debugging tests:
An exception of type 'System.Exception' occurred in Caliburn.Micro.Platform.UWP.dll but was not handled in user code
Additional information: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at Windows.UI.Xaml.Application..ctor()
at Caliburn.Micro.CaliburnApplication..ctor()
at My.WindowsMobile.UI.App..ctor()
at My.WindowsMobile.UnitTest.My_WindowsMobile_UnitTest_XamlTypeInfo.XamlTypeInfoProvider.get_OtherProviders()
at My.WindowsMobile.UnitTest.My_WindowsMobile_UnitTest_XamlTypeInfo.XamlTypeInfoProvider.CheckOtherMetadataProvidersForName(String typeName)
at My.WindowsMobile.UnitTest.My_WindowsMobile_UnitTest_XamlTypeInfo.XamlTypeInfoProvider.GetXamlTypeByName(String typeName)
at My.WindowsMobile.UnitTest.App.GetXamlType(string fullName = "Windows.Foundation.IReference`1<Windows.UI.Xaml.Automation.Peers.AccessibilityView>")