Wix 4 Harvesting Question #7805
Replies: 4 comments 4 replies
-
The problem is probably because you are using the wrong extension for your source code. It should be Just kidding. Your extension is wrong but that's probably not the problem. :) My guess is the harvested directory doesn't exist. I just did the first Deployment Dojo episode on harvesting with more to follow over the next few weeks. It happens to cover this scenario (and more). |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying. I watched the video, but it's overwhelming. I'm still having trouble. I'm pretty frustrated at this point.
I'm getting the compilation error I just threw together this sample app. It behaves the same. Can you please take a look and tell me what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
-
Then I saw you updated the repo to fix the missing directory, and now everything works exactly as it should. You have two ComponentGroups with the same Id. The error messages are longer than just The root problem in this case is that you had the wrong directory when harvesting. |
Beta Was this translation helpful? Give feedback.
-
I'm stuck with the same problem. I have gone through so many examples and docs and with a bit of help from @robmen I've worked out that the Registry is somehow tangled up with Harvesting - disabling harvesting the registry makes HarvestDirectory stop throwing errors. However the component group is still not found when the MSI build happens - however somehow I still get an MSI, but as it's only 32k, I assume it's empty! @MaroisConsulting can you share the harvest directory settings you used? Here's mine... what did you do differently to make it work? MyProject.wixproj
<Project Sdk="WixToolset.Sdk/4.0.2" TreatWarningsAsErrors="true">
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<ItemGroup>
<HarvestDirectory Include="$(SolutionDir)AgentService\bin\Release\net7.0">
<ComponentGroupName>AgentServiceFiles</ComponentGroupName>
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
<SuppressRootDirectory>true</SuppressRootDirectory>
<!-- dont know why but disabling harvesting registry keys makes HEAT5151 error go away here -->
<SuppressRegistry>true</SuppressRegistry>
</HarvestDirectory>
<BindPath Include="$(SolutionDir)AgentService\bin\Release\net7.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Heat" />
</ItemGroup>
</Project> package.wxs
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" >
<Package
Name="AgentSetup"
Manufacturer="A Company"
Version="1.0.0.0"
UpgradeCode="68c96489-4459-4f0b-8c73-e4f6f8f8ddf1"
>
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
<Feature Id="Main">
<ComponentGroupRef Id="AgentServiceFiles" />
</Feature>
</Package>
</Wix> In the diagnostic output I see this, but as HarvestDirectory was throwing loads of HEAT5151 errors until I disabled registry harvesting, I think these must be a red herring - it was clearly running and doing something.
I can't see any reference to setting a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's my Product.wsx:
I have this in my Wix project:
When I run, nothing is generated. Isn't there supposed to be a generated file with the harvest results in it?
Also, there is no .MSI created anywhere that I can see.
Could someone point me to the documentation for this? I got this code snippet off of SO. I can't seem to find anything like it in these docs: https://www.firegiant.com/docs/wix/tutorial/
Beta Was this translation helpful? Give feedback.
All reactions