Fixing XAML Intellisense in VS 2008 sp1

September 3rd, 2009

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.

One Response to “Fixing XAML Intellisense in VS 2008 sp1”

  1. Sly Says:

    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!