I'm having trouble with my first attempt at unit-testing custom actions 
with Lux.

In a fragment in "properties.wxs",
<Property Id="BAR_PROP" Value="???" Secure="yes" />

In a fragment in "CustomActions.wxs",
I have Binary and CustomAction elements to configure "FooMethod" as 
immediate.

In the C# code for custom action "FooMethod",
session["BAR_PROP"] = "zed";

In a fragment in "test.wxs" (I tried this with and without a Condition),
<lux:UnitTest CustomAction="FooMethod" Property="BAR_PROP" Value="zed" 
Operator="equal">
  <lux:Condition>1</lux:Condition>
</lux:UnitTest>

When I run the test with msiexec or nit, I get:
Test <id> failed. Property 'BAR_PROP' expected value 'zed' but actual value 
was '???'.

As far as I can tell from the MSI log, FooMethod is not actually invoked. 
But, BAR_PROP is not blank, so it's getting set from properties.wxs, and 
I'm getting a message from the UnitTest, so I must be close.

Shouldn't the UnitTest element cause FooMethod to be called? This 
particular method is normally invoked in InstallUISequence, but for the 
test MSI, I don't specify the InstallUISequence element. I can see 
FooMethod in the CustomAction table with Orca. The MSI looks OK, but the CA 
does not appear to execute. What else do I look for?

Thanks,
Gary
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to