Playing and learning with UWPs today, I found a strange error when compiling with VS 2015:
Xaml Internal Error error WMC9999: Cannot find type System.MarshalByRefObject
It's a bit misleading, but one can easily see that it's related to DLL references. After dealing with it for a while, I realized some of my Nuget packages were not up to date. Updating them fixed the issue.
More precisely, updating Microsoft.NETCore.UniversalWindowsPlatform to version 5.1.0 fixed the issue.
Hope it helps!