Did you return the schema from your extension's Schema property? You might check out the source code for the other extensions in wix at src\ext\*\wixext.
On Tue, Jan 5, 2010 at 6:16 PM, <akihiro.shib...@jp.yokogawa.com> wrote: > 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 > > -- virtually, Rob Mensching - http://RobMensching.com LLC ------------------------------------------------------------------------------ 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