Fixing XAML Intellisense in VS 2008 sp1
On my current project, I ran into a problem with Intellisense not working in XAML in some files. Through trial and error I found out referencing the current assembly in an assembly namespace caused the issue. Normally you declare an assembly reference namespace like this:
xmlns:local=”clr-namespace:MyAssembly.MyNamespace;assembly=MyAssembly”
If you leave off the “;assembly=MyAssembly” part, then the reference is a local reference to the assembly the XAML file is in.
Leaving off the assembly part seems to break intellisense, so to fix it use “assembly=” instead like this:
xmlns:local=”clr-namespace:MyAssembly.MyNamespace;assembly=”
This makes both the Intellisense engine and the compiler happy.



September 10th, 2009 at 4:46 pm
Awesome, thanks for sharing this! It was extremely painful not to have the auto complete to show me available properties or to create automatically event handlers just because I was using User controls form the same assembly within my xaml.
Adding the ‘assembly=’ fixed the problem for all my xaml files.
Yay!