Untitled

Random thoughts about everything and nothing

Archive for May 2007

How to keep intellisense during GAT config editing

with 2 comments

Problem:
I use (need :-)) intellisense when editing GAT config files. However, it stops working when it can’t resolve a type.

e.g. Intellisense breaks after including TypeAlias.xml, it can resolve “<xi:include …>”

<Recipe Name=”GenerateRepeatingClassT4″ Bound=”false”>
<xi:include href=”TypeAlias.xml” xmlns:xi=”http://www.w3.org/2001/XInclude&#8221; />

Solution:
Add the “xi:include” element to different complex types defined in the http://schemas.microsoft.com/pag/gax-core&#8221; namespace.

1. Edit the GuidancePackageConfig.xml, located at: C:Program FilesMicrosoft Visual Studio 8XmlSchemas

Note: If the xml file is missing, do a search for it and copy the file into this directory to achieve intellisense.

2. Add xmlns:xi=”http://www.w3.org/2001/XInclude&#8221;, resulting in the following heading.

<xs:schema attributeFormDefault=”unqualified” elementFormDefault=”qualified”
xmlns:xi=”http://www.w3.org/2001/XInclude&#8221;
xmlns:xs=”http://www.w3.org/2001/XMLSchema&#8221;
xmlns=”http://schemas.microsoft.com/pag/gax-core&#8221;
xmlns:gax=”http://schemas.microsoft.com/pag/gax-core&#8221;
version=”1.0″
targetNamespace=”http://schemas.microsoft.com/pag/gax-core”&gt;

3. Find the “Recipe” element, add the following element “<xs:element ref=”xi:include” minOccurs=”0″></xs:element>”

<xs:element name=”Recipe”>
<xs:annotation>
<xs:documentation>
Defines a recipe.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref=”xi:include” minOccurs=”0″></xs:element>
<xs:element name=”DocumentationLinks” minOccurs=”0″>
<xs:annotation>
<xs:documentation>
A list of documentation links to be displayed by the Guidance Navigator
window as part of the information for a given recipe.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref=”Link” maxOccurs=”unbounded” minOccurs=”0″ />
</xs:sequence>
</xs:complexType>

Use the same approach (step 3) when you encounter other “failing” xi:include references.

Advertisements

Written by Michael

May 8, 2007 at 9:01 pm

Posted in .NET, GAT, VSX