firegiant / HeatWaveSupport

Issues-only repository to report HeatWave bugs and feature requests to FireGiant
3 stars 0 forks source link

Building with HarvestProject fails (WinUI + .net6) #20

Closed ilamp closed 1 year ago

ilamp commented 1 year ago

HeatWave Version

0.9.4

Visual Studio Version

17.4.4

Repro Steps

  1. Checkout and load https://github.com/ilamp/WixSetup in visual studio
  2. Build the Package project

Actual Result

Build fails with following error:

Error   HEAT5313    Build error during harvesting: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1830,5): error MSB4127: The "GetReferenceNearestTargetFrameworkTask" task could not be instantiated from the assembly "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.Build.Tasks.dll". 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 'NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask' to type 'Microsoft.Build.Framework.ITask'.    **.Package  D:\Code\**\**.Package\heat.exe  1
Severity    Code    Description Project File    Line    Suppression State
Error   HEAT5313    Build error during harvesting: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1830,5): error MSB4060: The "GetReferenceNearestTargetFrameworkTask" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.   **.Package  D:\Code\**\**\heat.exe  1
Severity    Code    Description Project File    Line    Suppression State
Error   HEAT5307    Build failed.   **.Package  D:\Code\**\**\heat.exe  1

Expected Result

Package project is built successfully

ilamp commented 1 year ago

This works with WiX v3, but fails in v4.

FireGiantHelp commented 1 year ago

Heat-based harvesting is a feature of the WiX Toolset. We saw that you already opened wixtoolset/issues#7201 and got traction with the community on the issue there.

You might also be interested in our Advanced Harvesting that is part of our WiX Expansion Pack (WEP). The WEP for WiX v4 support is finishing up development and expected to be available when WiX v4.0.0-rc.3 is released later this month.