[wix-users] W10: ExecNetFx Compiling Assembly issues for Microsoft NetFx assemblies

Tobias S tobias.s1979 at gmail.com
Wed Aug 5 00:36:35 PDT 2015


NGening was included in the installer by
<netfx:NativeImage Id="ngen.filename.exe" Platform="$(var.PlatformNGen)"
Priority="0" AppBaseDirectory="INSTALLDIR"/>
for several application assemblies. NGEN itself was not touched.


So it was no problem with the CA wrapper itself (NativeImage Element (Netfx
Extension)) but the called NGEN.exe. The NGEN.exe version called by the CA
was correct. But this NGEN.exe was not working properly on W10 RTM.

And NativeImage Element (Netfx Extension) CA return values are not
evaluated so installation doesn't not break.(Just NGEN itself took long
time - in total approx. 45 min)


IMHO this should be the corresp. CA code not breaking the CA in case some
of the files are not correctly processed:
hr = QuietExec(pwzData, NGEN_TIMEOUT, TRUE, TRUE);
        // If we fail here it isn't critical - keep looping through to try
to act on the other assemblies on our list
        if (FAILED(hr))
        {
            WcaLog(LOGMSG_STANDARD, "failed to execute Ngen command (with
error 0x%x): %ls, continuing anyway", hr, pwzData);
            hr = S_OK;
        }

Afterwards there was also the following line in the log:
ExecNetFx:  failed to execute Ngen command (with error 0xffffffff):
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install
"C:\MyInstallFolder\MyAssembly.dll" /AppBase:"C:\MyInstallFolder\",
continuing anyway


More information about the wix-users mailing list