Tuesday, July 03, 2012 6:43 PM
I am having a problem adding a custom WPF control to my xaml – the xaml page of interest can not find the custom control. It is created in the same project and same folder, but under a different namespace. I reference the namespace as follows:
since the namespace is defined in the current assembly, I didn’t use assembly=myassemblyname.
My problem exists with the xaml in design view won’t load. This error appears:
The 'clr-namespace' URI refers to a namespace mynamespace ' that is not included in the assembly.
I can work around this by adding the assembly as a reference, but then I get a zillion warnings that conflicts exist between classes existing in the assembly and the cs file. I dislike warnings so I don’t want to stay with this solution.
It is so frustrating – everything is spelled correctly, the project builds and runs correctly, the same code even works on my co-worker’s machines (or so they say) just not mine! We all are using visual studios 2010 w/ sp1.
Much thanks, Beth
- Moved by Min ZhuMicrosoft Contingent Staff Thursday, July 05, 2012 4:36 AM (From:Windows Presentation Foundation (WPF))
Tuesday, July 03, 2012 7:46 PMIn VS2010 when you type in this: xmlns:local= do you see intellisense pop up with that namespace?
JP Cowboy Coders Unite!
- Edited by Mr. Javaman II Tuesday, July 03, 2012 7:47 PM
Tuesday, July 03, 2012 7:57 PMYes I do see intellisense with the desired namespace. I can select it and then use it below in the xaml to add the control of interest, which also shows with in the intellisense when I type <local: Everything looks OK for about 10 seconds, then the "Undefined CLR namespace ......" error shows up again!
Thursday, July 05, 2012 4:37 AM
We have moved the thread to the WPF Designer forum since the problem is specific about the designer.
Have a nice day!
Min Zhu [MSFT]
MSDN Community Support | Feedback to us