Archive for May 2007
How to keep intellisense during GAT config editing
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” /> |
Solution:
Add the “xi:include” element to different complex types defined in the “http://schemas.microsoft.com/pag/gax-core” 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”, resulting in the following heading.
<xs:schema attributeFormDefault=”unqualified” elementFormDefault=”qualified” xmlns:xi=”http://www.w3.org/2001/XInclude” xmlns:xs=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.microsoft.com/pag/gax-core” xmlns:gax=”http://schemas.microsoft.com/pag/gax-core” version=”1.0″ targetNamespace=”http://schemas.microsoft.com/pag/gax-core”> |
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.