Mike,

Thanks for the info! I actually found a bug registered January 22nd that looks 
to be the same issue ([ 1877424 ] LGHT0001: Duplicate Key added) although a 
different key. That bug report states that the 3.0.3526 release does not have 
this problem so I downgraded to that release and now it works perfectly. I 
tried to compile the sourcecode of 3.0.3711 in order to fix the error according 
to your suggestion, but there was just too much that needed to be changed in 
the build configuration in order to build on my Vista x64 computer with only VS 
2008 installed (I didn't want to install VS 2005 as well) so I decided to save 
some time and downgrade Wix instead.


Regards,

Arild

From: Mike Dimmick [mailto:[EMAIL PROTECTED]
Sent: 23. januar 2008 21:37
To: Arild Bakken; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Trouble with Light in Visual Studio 2008 and Team 
Build2008

This is a change in the MSBuild actions in very recent builds of WiX. Instead 
of creating a new process it now loads the assembly in-process.

It looks like light.exe can't actually handle that - that various static 
variables aren't being cleared down between sessions.

Unfortunately to revert requires changing the base class of 
Microsoft.Tools.WindowsInstallerXml.Build.Tasks.Light (in 
src\WixTasks\Light.cs) back to ToolTask, rather than WixToolTask, then 
rebuilding.

You can probably get round it by creating a new AppDomain for each run rather 
than reusing AppDomains. (A new AppDomain has its own copy of static variables.)

I suggest logging a bug at 
http://sourceforge.net/tracker/?group_id=105970&atid=642714.

--
Mike Dimmick

________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arild Bakken
Sent: 23 January 2008 10:37
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Trouble with Light in Visual Studio 2008 and Team Build2008

Hi everyone,

I'm having trouble with Light.exe. I installed the January 11 build (3.0.3711) 
and things work very well except that I can only build the Setup project once 
for every time I start Visual Studio. When I build the first time after I start 
Visual Studio 2008, everything is OK, but all builds after that fail with 
"Light.exe exited with code 1".  If I restart Visual Studio I can build once 
again. I can live with that, cause all I have to do is copy the light.exe 
commandline that Visual Studio shows in the output into a commandprompt and it 
works.

The problem though is that this also happens with Team Build (TFS) when I build 
both release and debug versions of the product. The first (usually Release) 
builds fine, but the second fails. When running Team Build I get additional 
error information (which I don't see when running in Visual Studio):

light.exe : error LGHT0001 : Item has already been added. Key in dictionary: 
'InstallUISequence/PrepareDlg'  Key being added: 'InstallUISequence/PrepareDlg'
Exception Type: System.ArgumentException
Stack Trace:
   at System.Collections.SortedList.Add(Object key, Object value)
   at 
Microsoft.Tools.WindowsInstallerXml.WixActionRowCollection.Add(WixActionRow 
actionRow, Boolean overwrite)
   at Microsoft.Tools.WindowsInstallerXml.Linker.SequenceActions(RowCollection 
actionRows, RowCollection suppressActionRows)
   at Microsoft.Tools.WindowsInstallerXml.Linker.Link(SectionCollection 
sections, ArrayList transforms)
   at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
Binder temporary directory located at 'C:\Documents and 
Settings\_tfsservice\Local Settings\Temp\nnj-8nas'.
Validator temporary directory located at 'C:\Documents and 
Settings\_tfsservice\Local Settings\Temp\3b6mv9ua'.

So, it looks like some stuff is "stuck" in memory between builds. It seems that 
Visual Studio 2008 / TFS Build 2008 does not actually spawn a separate process 
for light.exe, but seems to load the assembly into an appdomain - so any static 
stuff would survive successive builds (this is guesswork, but I never see a 
light.exe process during builds so I'm guessing VS loads the assembly and runs 
stuff).

As a test I removed all UI stuff from the wix project (since the error relates 
to InstallUISequence), and now I can build without problems, but of course I 
would like some UI for the installer J

Has anyone else run into this problem? Is there a know fix?


Regards,

Arild
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to