Hi Blair,

Ok, does that mean I've encountered an error in the book, then? The book
suggests adding the wixlib to the extension, and I've done that (means I
should only have to reference the extension, not the wixlib, right?).

However, the sample code in the book does not come with a test install
which shows how to reference it, nor is this discussed in the book in any
detail. I was going to create one but have not had the time yet, so I'm not
sure if the code in the book works or not. (Wouldn't be the first time I've
come across sample code in a book that doesn't compile).

I got that the extension needs to be supplied to both (though, honestly,
it's a bit annoying having to propagate the references). That's obviously
why the first error appeared.

It made sense that this was because I was referencing it twice, but I
figured the book was probably correct and I was missing something (and I
didn't want to just remove the line so it worked "temporarily"). It would
probably be a good improvement to have this behave like I described above -
you can only declare something once, but you can create as many references
as you like to it, even if those references are technically duplicates of
each other.

In  the meantime, I'll remove that line.

Thanks

PS: I'm still planning to write this up as a tutorial, but I just want to
get stuff like this sorted first


On 10 July 2013 14:46, Blair Murri <os...@live.com> wrote:

> A WixExtension used in the way you describe usually supplies three things:
> a CompilerExtension (to parse your new elements and attributes), a Table
> definition (comes from a tables.xml-style file with the definitions of the
> tables unique to your extension), and a binary-wixlib (containing your CAs
> and related authoring).
>
> Usually your CompilerExtension will supply two things: references to items
> in your wixlib, and rows into your tables (from the authoring you parse).
> Those rows are not part of your wixlib.
>
> CreateWixSimpleReferenceRow creates a reference to a row that needs to be
> supplied from elsewhere, usually the wixlib supplied by the extension.
>
> If the WixExtension supplies the wixlib, you don't need to supply it.
> Also, if the WixExtension supplies the table definitions (via the
> tables.xml-style file), you don't need to duplicate the table definitions
> in your wixlib (using CustomTable elements).
>
> Also, make sure that your extension is supplied to both candle and light
> in your build script.
>
> I would guess that you are missing the tables.xml-style reference in your
> WixExtension (which I suspect is the source of your "missing" error), and
> that you are supplying the wixlib used in your extension directly to your
> setup project (which I suspect is the source of your duplicate symbol).
>
> > From: john.ludlow...@gmail.com
> > Date: Wed, 10 Jul 2013 12:25:38 +0100
> > To: wix-users@lists.sourceforge.net
> > Subject: [WiX-users] Duplicate symbol when using
>  CompilerCore.CreateWixSimpleReferenceRow
> >
> > Hi,
> >
> > My installer has two projects - a Setup Project which emits an .MSI and
> > contains install metadata, and a Setup Library Project which emits a
> > .wixlib which contains install components. The latter makes use of a
> > compiler extension which generates an MSI table based on some child
> > elements of the File element. In other words, it looks like this:
> >
> > <File>
> >    <myext:MyFunkyExtension/>
> > </File>
> >
> > (attributes omitted for brevity)
> >
> > The extension consists of three projects: a C# class library for the
> actual
> > extension, a C++ Custom Action Library for the custom actions that will
> use
> > the data in the table, and a wixlib to hold the custom action definition.
> > The CA DLL is bound into the wixlib, and the wixlib is included in the
> > extension dll project as an embedded resource.
> >
> > Now here comes the issue...
> >
> > When I reference the extension DLL from just the wixlib which has the
> > components in, I get this error:
> >
> > Error 1 Cannot find the table definitions for the 'MyTable' table.  This
> is
> > likely due to a typing error or missing extension.  Please ensure all the
> > necessary extensions are supplied on the command line with the -ext
> > parameter. light.exe 0 1 MyInstall
> >
> > I wondered if the setup project needed the reference as well, but when I
> > add that I get this:
> > Error 1 Duplicate symbol 'CustomAction:MyCA' found. This typically means
> > that an Id is duplicated. Check to make sure all your identifiers of a
> > given type (File, Component, Feature) are unique.
> > MyComponentSetupLibrary.wixlib 0 1 MyInstall
> >
> > I reckon this is down to this code at the end of the ParseElement methjod
> > in the extension:
> >
> >    Core.CreateWixSimpleReferenceRow(ln, "CustomAction", "MyCA");
> > I did this on the suggestion of the Wix 3.6 Development Guide (Chapter
> 14)
> > in order to create a reference to the action in order to pull the
> fragment
> > into the installation.
> >
> > I also noticed that my ParseElement method seems to get called twice. Is
> > this because I have 2 references from my projects (one from my setup
> > project and one from my setup library project)? This is odd - I thought
> you
> > could reference things as many times as you liked in this manner, and if
> it
> > was already there then it would just ignore it.
> >
> > Any hints would be greatly appreciated.
> >
> > Thanks
> >
> > John
> >
> ------------------------------------------------------------------------------
> > See everything from the browser to the database with AppDynamics
> > Get end-to-end visibility with application monitoring from AppDynamics
> > Isolate bottlenecks and diagnose root cause in seconds.
> > Start your free trial of AppDynamics Pro today!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to