Invalid XmlnsDeclaration error

Apr 19, 2012 at 9:39 AM

The WPF sample "Synegy" works, but I am unable to view the MainWIndow.xaml in the designer.  I get this error:

Error 1 Invalid XmlnsDeclaration occurs in assembly 'MixModes.Synergy.VisualFramework, Version=, Culture=neutral, PublicKeyToken=null'. XmlnsDeclaration references a namespace 'MixModes.Synergy.VisualFramework.Adorners' that is not in the assembly. C:\Users\mandadir\Downloads\Synergy\Synegy\MainWindow.xaml 1 1 Synegy


Apr 19, 2012 at 9:46 AM

I found out the problem.  The adorner classes were declared as internal, I changed it to public.

Jun 2, 2012 at 11:50 PM
Edited Jun 3, 2012 at 12:08 AM

Hi I am still getting the issue described above i believe i have downloaded the latest version...what can you do to assist me. thanks. I want to use the .dll reference in my app. i changed the modifier from internal to public and rebuilt the solution and i used the rebuilt .dll but i still get the same issue. forgive me but i am a newbie.

Jun 4, 2012 at 9:26 PM


I'm just giving this a try in my project and came across the same problem. I was able to fix it as above by changing the adorner classes to public. Note that you have to make the change in 3 files (AdornerBase.cs, ContentAdornerBase.cs and ResizingAdorner.cs).  I also tried downloading the code from the Codeproject site and came across a slightly different problem - I had to remove the reference to "MixModes.Synergy.VisualFramework" from the AssemblyInfo.cs file.

I also had to add a reference to MixModes.Synergy.Utilities in my project.

Hope this helps.


Jun 9, 2012 at 12:47 PM

Thanks ChangedDaily that looks like the problem. i did make the changes to the three classes i see that the removal of the reference to "MixModes.Synergy.VisualFramework" from the AssemblyInfo.cs will do the trick.

Apr 21, 2014 at 4:32 PM
Edited Apr 21, 2014 at 11:44 PM
The XmlnsDeclaration and .Net 4.5
  • Declairing XmlnsDeclaration in a AssemblyInfo Class, you'll not find the reference in the "WindowBase" Reference.
  • You need a reference to the "System.Workflow.ComponentModel.Serialization" thats where you'll find it.
  • Hope this was of use