views:

561

answers:

2

The code-complete feature in Visual Studio is very useful, and it still works for C# and C++ code - but no longer works for XAML (XML) editing.

Is there a setting somewhere that can re-enable this? My co-workers still have it working.

A: 

(I'm assuming that you mean intellisense by "code complete")

Intellisense for xml documents is controlled by XSD files. When you're editing a xaml file, look at the menu bar. You should see a menu item called XML. At the bottom of this you'll see a menu item "Schemas..." Click on that.

You'll see a list of all the available schemas in the system. Messing with this list, or the schemas that ship with VS (usually in c:\program files\visual studio 9.0\xml\schemas) can cause xml (aka xaml) intellisense.

I would first suggest making sure there are no checks or X's in the Use column for any schema. All cells should be blank (aka Automatic). This way, VS picks up the namespaces from your xml file and applies the corresponding schemas from this list.

Secondly, check the namespaces in your xml file. Check to see if the corresponding XSD schema is listed. If not, hunt it down and add it in.

If these two don't fix the problem, get a full copy of your co-worker's schema directory and copy it over yours. Open up that schema window and make sure every XSD is in there, and set to automatic.

The last step is a repair install of Visual Studio, followed by a good helping of automatic updates.


If you're talking about the addin "code complete", get the latest version from their website and reinstall it. SP1 might have broken your current installation.

Will
The XAML editor works differently than the normal XML editor. It doesn't use an XSD schema for intellisense.
Mike Brown
+3  A: 

I think this post on the MSDN forums might be of assistance. Basically, the Win SDK breaks XAML Intellisense. I think there is a more mainstream (non-registry hack) solution available as well

Mike Brown
+1 That saved me a headache.
Erich Mirabal