[wix-users] Problem creating my 1st patch

Steve De George stevedegeorge at pivotalz.com
Thu Jan 26 02:40:52 PST 2017


Thanks Tyler


You pointed me in the right direction. My boss purchased a tool called 'Designer for WiX Toolset' for visual studio. This was adding the '-gg' option to heat.exe and that was causing all my issues.


But hey...  I got a working patch!!!!!


Thanks to all.


Steve De George - Pivotal Z / NextGen Software, Inc.
253-656-4061
www.pivotalz.com<http://www.pivotalz.com/>
www.nextgensoftware.com<http://www.nextgensoftware.com/>
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Tyler Gustafson <tgustafson at solacom.com>
Sent: Wednesday, January 25, 2017 8:27:51 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Problem creating my 1st patch

I'm having a hard time following it all but one quick question:
I notice you named a directory "Harvested Output" are you using Heat.exe to generate your fragments with the files in them?

I think heat generates GUIDs based at least partially on the path to the file and the file name. If you are re-running it on files in different locations and changing the GUIDS for your components between MSI 1 and MSI 2 then you might get something like what you're describing. It's complaining that you have removed a component (or changed it's GUID) which you're not allowed to do in a patch.

Tyler

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steve De George
Sent: January-25-17 10:48 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Problem creating my 1st patch

H all.


Very new to wix patching and having a heck of a time. I have created a simple .NET project with a single EXE and DLL and use the following code to create the MSI.


<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="1E271816-1351-4572-A058-FA720D8FA07F" Name="testSetupWix" Language="1033" Version="6.1.0.0" Manufacturer="TESTME"
           UpgradeCode="329a96ac-4cc1-4def-86d5-129ab2334da5">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <CustomAction Id="DIRCA_TARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder][Manufacturer][ProductName]" Execute="firstSequence" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <Feature Id="ProductFeature" Title="testSetupWix" Level="1">
      <ComponentGroupRef Id="testBuild.Binaries" />
      <ComponentRef Id="comp_ED4131E0_4D88_44EE_AC82_F0DC9F345F98" />
      <ComponentRef Id="comp_B703295B_D132_4D96_AB94_9685B4B76B73" />
    </Feature>
    <InstallExecuteSequence>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </InstallExecuteSequence>
    <InstallUISequence>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </InstallUISequence>
    <AdminUISequence>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </AdminUISequence>
  </Product>
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Component Id="comp_ED4131E0_4D88_44EE_AC82_F0DC9F345F98" Guid="8922AF09-9244-4E48-B418-947878BE29A7" Permanent="no" SharedDllRefCount="no" Transitive="no">
        <File Id="_11C06903_E49C_4F23_BF83_68D16B7B3BAD" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="TestDLL.dll" Source="..\TestDLL\bin\x86\Release\TestDLL.dll" KeyPath="yes" />
      </Component>
      <Component Id="comp_B703295B_D132_4D96_AB94_9685B4B76B73" Guid="B4DBFA5B-FAEF-437E-B349-39B5FC3597C8" Permanent="no" SharedDllRefCount="no" Transitive="no">
        <File Id="_2F1968B1_0DAD_47CC_85E9_75104E4ACD1A" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.VisualBasic.dll" Source="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.VisualBasic.dll" KeyPath="yes" />
      </Component>
      <Directory Id="testBuild.Binaries" />
    </Directory>
  </Fragment>
  <Fragment>
  </Fragment>
</Wix>



All is fine and I get the MSI and wixpbd. I then change the versions 6.1.0 to 6.1.1 in the project and the wix file, change some text in the EXE and create a another MSI.


I copy to my test environment into 2 different folders.

I run (version 6.1.0)

Melt.exe "Error\testSetupWix.msi" -out "Error\TMP\testSetupWix.wixpdb" -pdb "Error\testSetupWix.wixpdb" -x "Error\bit"

and (version 6.1.1)
Melt.exe "Fixed\testSetupWix.msi" -out "Fixed\TMP\testSetupWix.wixpdb" -pdb "Fixed\testSetupWix.wixpdb" -x "Fixed\bit"

To clean up the original build references. and generate new wixpbd files.

My patch file looks like this.
<?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

   <?define Manufacturer="My Software, Inc."?>
   <?define ProductVersion="6.1.1.0"?>

  <Patch AllowRemoval="yes" Manufacturer="$(var.Manufacturer)" MoreInfoURL="www.nextgensoftware.com<http://www.nextgensoftware.com>"
    DisplayName="Test Patch" Description="Small Update Patch" Classification="Update">

    <Media Id='5000' Cabinet='RTM.cab'>
      <PatchBaseline Id='RTM'/>
    </Media>

    <PatchFamilyRef Id="PatchFamily15"/>

    <PatchFamily Id='PatchFamily15' Version='1.0.0.0' Supersede='yes'>

    </PatchFamily>

  </Patch>
</Wix>

and I then run:
torch.exe -p -xi "Error\tmp\testSetupWix.wixpdb" "Fixed\tmp\testSetupWix.wixpdb" -out Patch.wixmst candle.exe Patch.wxs light.exe Patch.wixobj -out Patch.wixmsp pyro.exe Patch.wixmsp -out Patch.msp -t RTM Patch.wixmst

And receive the following error when running pyro.
C:\Users\Administrator\documents\visual studio 2015\Projects\testBuild\testSetupWix\obj\Release\Harvested Output\_testBuild.wxs(8) : error PYRO0305 : Removing component 'cmp4DA31B5C507AE7E131F92598171460EE' from feature 'ProductFeature' is not supported. Either the component was removed or the guid changed in the transform 'C:\patch test\3 more time\Patch.wixmst'. Add the component back, undo the change to the component guid, or remove the entire feature.
C:\Users\Administrator\documents\visual studio 2015\Projects\testBuild\testSetupWix\obj\Release\Harvested Output\_testBuild.wxs(5) : error PYRO0305 : Removing component 'com_416D7812_3BDF_4869_97D5_89AAD0743B4A' from feature 'ProductFeature' is not supported. Either the component was removed or the guid changed in the transform 'C:\patch test\3 more time\Patch.wixmst'. Add the component back, undo the change to the component guid, or remove the entire feature.

What am I missing? I have been banging my head on this for a few days now.

Any help would be really appreciated!

Thanks.



















Steve De George - Pivotal Z / NextGen Software, Inc.
253-656-4061
www.pivotalz.com<http://www.pivotalz.com/>
www.nextgensoftware.com<http://www.nextgensoftware.com/<http://www.nextgensoftware.com<http://www.nextgensoftware.com/>>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list