Universal Unit Test project does not work once you reference the Template10 project
Crashes here once I attempt to debug a unit test that refers to a Viewmodel. Anyone else ?
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
An application-internal exception has occurred (parameters: 0x0112D680, 0x00000002).
Why is this marked as a bug? Is T10 doing something to cause this?
I'm also facing some weird behavior, when i try to run my Windows Universal Unit Test Project i receive this Exception: "Cannot deserialize XBF metadata type list as 'BootStrapper' was not found in namespace 'Template10.Common'. [Line: 0 Position: 0]"
The Exception is raised in the "UnitTestApp.g.i.cs". The Problem here is, that my Uni Test project does only contain one TestMethod which references a Converter. Even the converter has no reference to some Template10 classes.
@SvenLauterbach I am facing this problem too. Have you found a resolution?
@kunalbuxani Actually, no. But i found a Prism Github issue which is similar: https://github.com/PrismLibrary/Prism/issues/140
Especially one of the last posts (from TioLuiso, 16. Sept) states, that this isn't a problem of Prism. It's more a general problem of the uwp platform, that you can't reference a universal app in a unit test project. I haven't tested it yet, but i think this "solution" also applies to Template10, hence you have to create a separate lib with all non UI stuff (even converter, behaviors etc).
Thanks, this is the route I have gone. Having the Unit Test App referencing a library instead of an app works.
@SvenLauterbach UWP can be referenced in a Unit Test (confirmed with code sample).
Its a bug, as it happen with projects using Template 10, and not with default project template from MS
This isn't a valid resolution to the problem. As thang2410199 says, when you do this with the out of box UWP Blank project, then create a Unit Test project, and add a reference to the App, we are able to run any unit tests that reference classes in the UWP Blank project. But when I do the same thing with a Template10 project, I get the same exception: "Cannot deserialize XBF metadata type list as 'BootStrapper' was not found in namespace 'Template10.Common'. [Line: 0 Position: 0]"
There are cases when I don't want to put things in a separate class library. Can someone please investigate what is actually going on with the BootStrapper in Template10?
"The text associated with this error code could not be found.
Cannot deserialize XBF metadata type list as 'BootStrapper' was not found in namespace 'Template10.Common'. [Line: 0 Position: 0]"
Problem still exists, please provide solution.
Hey Guys, I'm facing the same issue. It seems to be a bug in template10 because my unit test worked fine before I added it to the project. Did anyone find a resolution yet?
Why is the issue closed when many people claim that issue comes only after adding template10 in the project? Do you have any workaround to this problem?
Thanks for your help!
Hi @SurenderMehar, another issue was created for this at https://github.com/Windows-XAML/Template10/issues/464. However, it is not labeled as a bug, which I think it should be. I have tried investigating this myself in my spare time, but no success so far, so I am hoping someone out there with better Template10 experience can investigate as we need a solution asap.
Thank you Sandip for your message! I really like the product but we do not approve any code unless it has unit tests written for it. Is there any workaround or alternative to this? Can we use template10 and still execute unit tests that ignore template10? Is it even possible? I have tried both the approaches.
- Use tempate10 from Nuget. This throws the error "Cannot deserialize XBF metadata type list as 'BootStrapper' was not found in namespace 'Template10.Common'.
- Include sources in solution and add as a project reference (I have checked Generate Output Library option and made sure post build events run successfully) This doesn't throw above error but debugger says cant attach an crashing app which means it crashed somewhere.
Thanks for your help! Surender
On Tuesday, April 5, 2016 1:52 AM, Sandip Ahluwalia <[email protected]> wrote:
Hi @SurenderMehar, another issue was created for this at https://github.com/Windows-XAML/Template10/issues/464. However, it is not labeled as a bug, which I think it should be. I have tried investigating this myself in my spare time, but no success so far, so I hoping someone out there with better Template10 experience can investigate as we need a solution asap.— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
it is related to Cannot unit test UWP app when using x:bind in resource dictionary, maybe?