In studying the source code I notice that the GamingExtension and the
IISExtension, among others, have a data\messages.xml in the wixext project
tree.  I tried to add a similar file to my project, changing the namespace,
class name, and container name.  However in the compiler extension code the
class name is undefined preventing the project from compiling.  I searched
the source for clues but did not find how to hook this messages.xml file
into my project.  I set the properties the same as for the tables.xml, as
Embedded Resource  and Always Copy.


<Messages Namespace="my_projects_namespace" Resources="Data.Messages"
xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages";>
  <Class Name="MyExtErrors" ContainerName="MyExtErrorEventArgs"
BaseContainerName="WixErrorEventArgs">
    <Message Id="SomeMessage" Number="20001">
      <Instance>
        Say something about the {0} element and this attribute: {1}.
        <Parameter Type="System.String" Name="elementName" />
        <Parameter Type="System.String" Name="attributeName1" />
      </Instance>
    </Message>
  </Class>
</Messages>

This line fails to compile as "MyExtErrors" is undefined.  
this.Core.OnMessage(MyExtErrors.SomeMessage(sourceLineNumbers, node.Name,
"attribute1"));

I guess I am not sure where MyExtErrors and MyExtErrorsEventArgs should be
defined.  When I search the wix source for the container name found in
various messages.xml files, I cannot find references anywhere else in the
src tree.  Your assistance is appreciated. Thanks Phill




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WixExtension-how-to-use-a-messages-xml-file-tp7592715.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&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