views:

113

answers:

1

Ok, I have an issue that is driving me nuts. In certain xaml files only, neither IntelliSense nor the folding editor is working.

I have noticed that if I delete the local namespace and add it back, the folding editor starts working.

If I delete the local namespace and don't add it back, IntelliSense starts working as well. Of course, I need to remember to add that namespace declaration back before I compile and/or check in ... which is annoying.

How can you fix this?

+1  A: 

After an internet search brought me to this post, I figured it out. My problem wasn't exactly the same, but I discovered that adding ';assembly=' to the local namespace declaration solved my problem!

So, this xaml doesn't work:

<my:Inspector
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:my="clr-namespace:Snoop"
    x:Class="Snoop.PropertyGrid2"
    x:Name="PropertyGrid"
    MinHeight="0"
    MinWidth="0"
>

While this xaml DOES work:

<my:Inspector
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:my="clr-namespace:Snoop;assembly="
    x:Class="Snoop.PropertyGrid2"
    x:Name="PropertyGrid"
    MinHeight="0"
    MinWidth="0"
>

Hope this helps someone. I know it was ticking me off!

p.s. Seems only an issue with Visual Studio 2008. Visual Studio 2010 works fine in both cases above.

cplotts