I know that the WixVsExtension defines properties like VS90_SCHEMAS_DIR that would be the directory you would need to place the .xsd file into. Use the appropriate property for the version of Visual Studio you are targeting.
Beyond that, either MSDN or the forums on MSDN would have much more information on this topic. -----Original Message----- From: akihiro.shib...@jp.yokogawa.com [mailto:akihiro.shib...@jp.yokogawa.com] Sent: Tuesday, January 05, 2010 6:16 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] How to create extension and a new schema ? HI, I develop a new extension. And I written a new schema in xsd file. I create a new setup project on Visual Studio, But it show display message that "Id" attribute cannot found on the message view of Visual Studio . How to import a new schema file and use on Visual Studio? something wrong ? 1) xsd file like this: ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------- <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" xmlns:html="http://www.w3.org/1999/xhtml" targetNamespace="http://schema.www.xxxx.com/wix/2009"> <xs:annotation> <xs:documentation> </xs:documentation> </xs:annotation> <xs:element name="AppendUserGroup "> <xs:annotation> <xs:documentation> </xs:documentation> <xs:appinfo> <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" /> <xse:remarks> </xse:remarks> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="Id" type="xs:string" use="required" > <xs:annotation> <xs:documentation> </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------- 2) extending the CompilerExntension and overriding a parse method. public override void ParseElement(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlElement element, params string[] contextValues) { switch (parentElement.LocalName) { case "Component": string fileId = contextValues[0]; switch (element.LocalName) { case "AppendUserGroup ": this.ParseAppendUserGroupElement(element, fileId); break; default: this.Core.UnexpectedElement(parentElement, element); break; } break; default: this.Core.UnexpectedElement(parentElement, element); break; } } 3) insert AssemblyDefaultWixEtension into AsseblyInfo.cs 4) a new setup project ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------- <Wix xmlns="http://schema.microsoft.com/wix/2006/wi" xmlns:myutil="http://schema.www.xxxx.com/wix/2009"> : <Compornent Id="COMPONENT1" > <myutil:AppendUserGroup Id="NewGroupName" /> </Component> : </Wix> ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------- Thanks, Akihiro Shibuta. ---------------------------------------------------------------------------- -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users