Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heat.exe: Failed to set loggers - causes my builds to fail. #4597

Closed
wixbot opened this issue Nov 17, 2014 · 18 comments
Closed

heat.exe: Failed to set loggers - causes my builds to fail. #4597

wixbot opened this issue Nov 17, 2014 · 18 comments
Assignees
Milestone

Comments

@wixbot
Copy link

wixbot commented Nov 17, 2014

After upgrading VS2013 with WiX Toolset 3.9 (from 3.8) I'm unable to build my WiX project anymore.

I have "Pre-build Events" that runs the heat.exe tool to harvest and transform my project outputs. Here's a sample command line used, which exits with code 5307:

"$(WixInstallPath)heat" project $(SolutionDir)Service.Windows.ApplicationServer\Service.Windows.ApplicationServer.csproj -configuration $(ConfigurationName) -pog Binaries -pog Satellites -pog Content -projectname Service.Windows.ApplicationServer -ag -template fragment -o $(ProjectDir)Service.Windows.ApplicationServer.wxs -t $(ProjectDir)TransformHarvest.xslt -nologo

The following is the error message received for the above:

> Warning   3   Failed to set loggers: Object of type 'System.Collections.Generic.List`1[Microsoft.Build.Framework.ILogger]' cannot be converted to type 'System.Collections.Generic.IEnumerable`1[Microsoft.Build.Framework.ILogger]'. heat.exe    0   1   Installer

I had to resort back to WiX Toolset 3.8 on the workstations and build servers.

Originally opened by jaans

@wixbot
Copy link
Author

wixbot commented Nov 18, 2014

Does the same command work at the command line? Does it work if you build the project from the command line using MSBuild? Please copy the .pdb files from https://wix.codeplex.com/downloads/get/925663 next to your WiX binaries and paste the full stack trace here. For example, here's my typical MSBuild alias:

MSBuild /consoleloggerparameters:Verbosity=minimal /fileLogger /fileloggerparameters:Verbosity=diagnostic /ignoreprojectextensions:.sln /maxcpucount /nodeReuse:False /detailedsummary

Originally posted by barnson

@wixbot
Copy link
Author

wixbot commented Nov 18, 2014

Hi there,
thanks for the follow-up.

I've downloaded the debug zip, and see there is a "pdbs" folder (with 3 sub folders "wixpdbs", "x64", "x86" folders below that), but I was not sure exactly where to copy them to. I'm running VS2013 and Win8.1 (64-bit).

It seams that I should copy the files from "pdbs\x86" in the ZIP to "C:\Program Files (x86)\WiX Toolset v3.9\bin" and that's what I've done. What about the "pdbs\x64" and "pdbs\wixpdbs" folders?

I'm was able to drop to the command console and run MSBuild but still get the same error message as what VS2013 catches. You can download the output from MSBuild (with the command-line switches you've specified below) and also the to the MSBuild.log file.

Note: I've done a crude search-n-replace for client specific elements, but it would be great if the MSBuild.log file is not made available for public consumption or the Google search bot ;-)

Let me know if I can be of assistance any further.

Thanks,
Jaans

Originally posted by jaans

@wixbot
Copy link
Author

wixbot commented Nov 18, 2014

Thanks. The log says this command fails. Can you try it at the command line and report back the output?

"C:\Program Files (x86)\WiX Toolset v3.9\bin\heat" project E:\Development\Projects\XXXX\Service.Windows.Automation\Service.Windows.Automation.csproj -configuration Release -pog Binaries -pog Satellites -pog Content -projectname Service.Windows.Automation -ag -template fragment -o E:\Development\Projects\XXXX\Installer\Service.Windows.Automation.wxs -t E:\Development\Projects\XXXX\Installer\TransformHarvest.xslt -nologo

Originally posted by barnson

@wixbot
Copy link
Author

wixbot commented Nov 19, 2014

Sure. Below is the output from that. (I added verbose command line to try and eek out more information):

Found ToolsVersion 12.0 inside project file.
Loading project using MSBuild version 12.0.
heat.exe : warning HEAT5399 : Failed to set loggers: Object of type 'System.Collections.Generic.List`1[Microsoft.Build.Framework.ILogger]' cannot be converted to type 'System.Collections.Generic.IEnumerable`1[Microsoft.Build.Framework.ILogger]'.
heat.exe : error HEAT5307 : Build failed.

Unfortunately there aren't more details than that. I did play around with the command line options progressively removing options to see if there is a particular one causing the error but that didn't show up anything.

FYI: I can confirm that the .PDB is being picked up because if I specify an invalid path to the project, it causes a FileNotFoundException with a detailed stack trace.

It's worth noting that the roll-back to v3.8 did work on the workstations and the build server.

Originally posted by jaans

@wixbot
Copy link
Author

wixbot commented Nov 20, 2014

Release changed from v3.9 to v3.10

@wixbot
Copy link
Author

wixbot commented Mar 3, 2015

Release changed from v3.10 to v3.x

@wixbot
Copy link
Author

wixbot commented Apr 7, 2015

Hei,

Getting the same issue, when using heat to harvest.
The issue started when I upgraded the target framework to .net 4.5.2 on the projects being harvested.

Hope this helps. It is only for heat command like above with heat .csproj -pog -out....

Originally posted by erlend.torsvik

@wixbot
Copy link
Author

wixbot commented Apr 19, 2015

Hi
I'm getting exactly the same error after retargeting my application ant .NET 4.5.2. It worked fine up until 4.5.1.
Is there a fix and should I be worried about this error as the application still seems to build and install otherwise.
Please advise.
Regards

Originally posted by julianwigman

@wixbot
Copy link
Author

wixbot commented May 19, 2015

I upgraded from 3.8 to 3.9 R2 yesterday and am now getting the same error in heat.exe, but I find it to be intermittent. I am using VS 2013 Premium Update 3 and am using heat to extract project deliverables from three projects. For me it is not fatal...it's just a warning message.

Originally posted by jblack

@wixbot
Copy link
Author

wixbot commented May 19, 2015

Let me add that the error I'm seeing is NOT intermittent, but it's happening only when heat tries to extract project information from a C++ project. Extracting information from a file or from a vb project is not generating the problem. Here is the command line that it causing the problem:

21> C:...\heat.exe" project "C:...\CG_MSP_COMShim.vcxproj" -projectname "CG_MSP_COMShim" -pog Binaries -gg -sfrag -nologo -out "obj\Release\Harvested XML_CG_MSP_COMShim.xml"

21>heat.exe(0,0): warning HEAT5399: Failed to set loggers: Object of type 'System.Collections.Generic.List1[Microsoft.Build.Framework.ILogger]' cannot be converted to type 'System.Collections.Generic.IEnumerable1[Microsoft.Build.Framework.ILogger]'.

Originally posted by jblack

@wixbot
Copy link
Author

wixbot commented May 22, 2015

Well we are now experiencing this issue as well. Like the most recent post we are experiencing it with a C++ project. And it has put our build process to a stand still. Any workarounds or solutions?!

Everything was working fine with 3.8. We were forced to upgrade to 3.9 because of incompatibility with Visual Studio 2013, when running Wix within Visual Studio..

[HeatProject] C:\BuildAgent\work\a90203a0f8ed7d51\velma\msvc....\build_tools\Wix\3.9\Heat.exe project C:\BuildAgent\work\a90203a0f8ed7d51\rosa\plugins\captureCard\msvc\captureCard.vcxproj -configuration Release -platform x64 -pog Binaries -pog Content -projectname captureCard -nologo -v -gg -nologo -sfrag -out "obj\x64\wirecastgamecobranded\Harvested XML\captureCard.xml"
[14:56:22][HeatProject] heat.exe warning HEAT5399: Failed to set loggers: Object of type 'System.Collections.Generic.List1[Microsoft.Build.Framework.ILogger]' cannot be converted to type 'System.Collections.Generic.IEnumerable1[Microsoft.Build.Framework.ILogger]'.
[14:56:22][HeatProject] heat.exe error HEAT5307: Build failed.

Originally posted by tuviahs

@wixbot
Copy link
Author

wixbot commented May 24, 2015

Originally changed by rseanhall
AssignedTo set to shall

@wixbot
Copy link
Author

wixbot commented May 24, 2015

v3.x pull request - 256

Originally posted by rseanhall

@wixbot
Copy link
Author

wixbot commented May 26, 2015

Fixed in weekly build 3.10.0.1726

Originally posted by rseanhall
Release changed from v3.x to v3.10
Resolution set to fixed
Status changed from Open to Resolved

@wixbot
Copy link
Author

wixbot commented Jul 17, 2015

I just downloaded and installed the RC for 3.10 to see if it fixed HEAT5399: Failed to set loggers. What I'm getting now is a different error: HEAT5313. I can provide more info if it will help!


22> "C:\Program Files (x86)\WiX Toolset v3.10\Bin\heat.exe" project "C:\Users\Owner\Documents_CG_Dev\Projects\OPX\CG_XL_COMShim\CG_XL_COMShim.vcxproj" -projectname "CG_XL_COMShim" -pog Binaries -gg -sfrag -nologo -out "obj\Release\Harvested XML_CG_XL_COMShim.xml"
22>heat.exe(0,0): error HEAT5313: Build error during harvesting: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(61,5): The "VCMessage" task could not be instantiated from the assembly "Microsoft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type 'Microsoft.Build.CPPTasks.VCMessage' to type 'Microsoft.Build.Framework.ITask'.
22>heat.exe(0,0): error HEAT5313: Build error during harvesting: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(61,5): The "VCMessage" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
22>heat.exe(0,0): error HEAT5307: Build failed.
22>C:\Users\Owner\Documents_CG_Dev\Projects\OPX\CG_XL_AddinSetup_x86_wix\CG_XL_AddinSetup_x86_wix.wixproj(135,5): error MSB3073: The command ""C:\Program Files (x86)\WiX Toolset v3.10\Bin\heat.exe" project "C:\Users\Owner\Documents_CG_Dev\Projects\OPX\CG_XL_COMShim\CG_XL_COMShim.vcxproj" -projectname "CG_XL_COMShim" -pog Binaries -gg -sfrag -nologo -out "obj\Release\Harvested XML_CG_XL_COMShim.xml"" exited with code 5307.


Jim Black

Originally posted by jblack

@wixbot
Copy link
Author

wixbot commented Aug 5, 2015

I installed the latest 3.10 beta and found that it resolved this reported issue for me. Thank you!

However, when I re-targeted the projects for .NET 4.6, it (HEAT) stopped working, and I'm now getting the following error: heat.exe : error HEAT0001 : Exception has been thrown by the target of an invocation.

D:\XXXX\Installer>"C:\Program Files (x86)\WiX Toolset v3.10\bin\heat" project D:\XXXX\Service.Windows.ApplicationServer\Service.Windows.ApplicationServer.csproj -configuration Release -pog Content -projectname Service.Windows.ApplicationServer -ag -template fragment -o D:\XXXX\Installer\Service.Windows.ApplicationServer.wxs
Windows Installer XML Toolset Toolset Harvester version 3.10.0.1823
Copyright (c) Outercurve Foundation. All rights reserved.

heat.exe : error HEAT0001 : Exception has been thrown by the target of an invocation.

Exception Type: System.Reflection.TargetInvocationException

Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Tools.WindowsInstallerXml.Extensions.VSProjectHarvester.ConstructMsbuildWrapperProject(String projectFile, HarvesterCore harvesterCore, String configuration, String platform, String shortVersion)
   at Microsoft.Tools.WindowsInstallerXml.Extensions.VSProjectHarvester.GetMsbuildProject(String projectFile)
   at Microsoft.Tools.WindowsInstallerXml.Extensions.VSProjectHarvester.GetProjectBuildOutputs(String projectFile, String[] buildOutputGroups)
   at Microsoft.Tools.WindowsInstallerXml.Extensions.VSProjectHarvester.Harvest(String argument)
   at Microsoft.Tools.WindowsInstallerXml.Harvester.Harvest(String argument)
   at Microsoft.Tools.WindowsInstallerXml.Tools.Heat.Run(String[] args)

Not sure why this is happening now. What gives?

Originally posted by jaans
Status changed from Resolved to Untriaged

@wixbot
Copy link
Author

wixbot commented Aug 5, 2015

Please do not attempt to morph bugs. If you have a new issue, contact the wix-users mailing list and if a bug is found open a new bug.

Originally posted by robmen
Status changed from Untriaged to Resolved

@wixbot
Copy link
Author

wixbot commented Aug 6, 2015

Thanks Rob. I did not intend to "morph bugs". By making it untriaged, those with an understanding of the internals can then assess ("triage") whether this issue being experienced is a result of the same bug (or from it's fix) or whether is indeed a new bug.

From your response I take it you want me to log this as new issue, or have you done this already?

Originally posted by jaans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants