wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

OutOfMemory Exception Heat Harvesting Large Number of Files With Transform Parameter #5349

Open jdickey9 opened 8 years ago

jdickey9 commented 8 years ago

v3.10.3.3007

Visual Studio Enterprise 2015 Update 2

.Net 4.5.2

When performing a heat harvest prebuild command

"$(WIX)bin\heat" dir "$(ProjectDir)Server\exe" -dr "WntExeFolder" -cg "exe" -gg -g1 -sfrag -srd -var "var.exe.TargetDir" -out "$(ProjectDir)exe.wxs" -t "$(ProjectDir)ServerFileTransForm.xslt"

ServerFileTransForm.xslt

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
    <xsl:template match="@*|*">
        <xsl:copy>
            <xsl:apply-templates select="@*" />
            <xsl:apply-templates select="*" />
        </xsl:copy>
    </xsl:template>
    <xsl:output method="xml" indent="yes" />
  <xsl:key name="search" match="wix:Component[contains(wix:File/@Source, '<excluded filename>')]" use="@Id" />
  <xsl:template match="wix:Component[key('search', @Id)]" />
  <xsl:template match="wix:ComponentRef[key('search', @Id)]" />
</xsl:stylesheet>

When the number of the files in the target directory is greater than 416 then I receive the following OutOfMemory Exception.

Error applying transform <path to stylesheet> to harvested WiX: Exception of type 'System.OutOfMemoryException' was thrown. <project name> heat.exe

Removing the -t parameter results in the harvest succeeding.

I had a quick look at the WiX source code and believe the error might be thrown from the Mutate method in UtilTransformMutator.cs

VivekRajaFluke commented 4 years ago

Hello Team,

I am getting the similar error when I am generating the msi. If I remove few dlls then it is working fine.

Can you please provide any quick solution to solve this.

robmen commented 4 years ago

This issue is open and unassigned. That means it is waiting for someone to investigate the root problem, discuss possible solutions to that problem then implement the decided solution.

If you are interested in doing so yourself, our developer documentation provides a great checklist for getting started.

If you are not interested then you are waiting for someone else to become interested. If this issue has been open for a long time then there probably isn't much interest in this particular issue. In that case, you'll want to consider how to motivate others to fix it for you. This is a pretty good list of support options.