There is an error in the xaml builder. On the first attempt to build, the error does not lead to the creation of all req'd files in debug \ obj. In a second attempt to build more files are created in debug \ obj, but not everything is required for xaml. If you create the third time, all the files that should be in debug \ obj are finally created, and xaml compiled.
That is why when cleaning or restoring a solution, the problem arises again until you create / build the solution.
This is only a problem when the namespace is in the same assembly as xaml. If the namespace is in a different assembly and another assembly exists, you will receive a successful assembly. If another assembly does not exist, then obviously the assembly will fail.
source share