Xaml UserControl in plugin throwing exceptions for Windows 10 UWP build

We have a plugin for our game which shows a WebBrowser as a UserControl.

In case of Windows Phone 8 & Windows Universal 10 platform we have class libraries in the form of dll files.

For Windows Universal 10 platform, the library throws a XamlParseException.

According to ZeeMoussa’s answer (and comments) on following thread I posted on StackOverflow -

XamlParseException when using UserControl from class library dll

there are xbf files generated in the build process for Xaml user controls**.**
From what I know, this was now the case with WP8 and everything worked fine - I could easily show a UserControl from the dll in the game.
I could include these xbf files automatically in a test visual studio solution by adding a reference to the UserControl project in the solution.

But when I did the same with the Visual Studio project that was generated with Unity, I got some errors -
a) if I didn’t remove the reference to dll in the project (I had to include the dll in the Plugins folder in Unity project to build it), then there were duplicate dll files and the project didn’t compile
b) and if I removed the references to the dll, the the project would compile but give a runtime exception - related to Unity not finding the referenced dll files.

I’m not sure how to include the xbf files in the unity game or how to reference project in the Visual Studio solution so as to not get any errors.

All help is greatly appreciated!

Does that plugin have any MonoBehaviour classes? You may try to mark this plugin as don’t process then.

You could also add those xbf files to the generated VS project manually.