简体   繁体   中英

Wix ToolSet Patch Creation Using “Patch Creation Properties”

First of all, I'd like to iterate that I am a complete noob regarding installers and patches, and have been living by articles from the interwebz.

Quick background: We've created an installer that "installs" a web app - creates IIS services, databases, etc. For the succeeding releases, we plan on using patches for the minor upgrades. We use .NET C# for this app.

I've been trying to create a patch for the project using the "Patch Creation Properties" tutorial from the wix site: http://wixtoolset.org/documentation/manual/v3/patching/patch_building.html

I managed to create a patch, and it does work, but I've noticed that it only changes html, js, and css files, along with the web config. Any changes that I made on .cs files were not reflected. I'm assuming that DLL files are not being replaced by the patch.

Below is my config for the patch.wxs:

<PatchCreation
      Id="{real guid heere}"
      CleanWorkingFolder="yes"
      OutputPath="C:\Outputpath\patch.pcp"
      WholeFilesOnly="yes" >

    <PatchInformation
        Description="Project 3.0.10 Patch"
        Manufacturer="project"/>

    <PatchMetadata
        AllowRemoval="yes"
        Description=" Patch v3.0.10"
        ManufacturerName="ManufacturerName"
        TargetProductName="TargetProductName"
        MoreInfoURL="www.google.com"
        Classification="Update"
        DisplayName="ManufacturerNamePatch"
        MinorUpdateTargetRTM="1"/>

    <Family DiskId="5000"
        MediaSrcProp="Patch"
        Name="patchtest">
      <UpgradeImage SourceFile="C:\output\test\new\admin\Setup.msi"
                    Id="UpgradeImage">
        <TargetImage SourceFile="C:\output\test\old\admin\Setup.msi"
                     Order="2"
                     Id="TargetImage"
                     IgnoreMissingFiles="no" />
      </UpgradeImage>
    </Family>

    <PatchSequence PatchFamily="SCMPatchFamily"
        Supersede="yes" />

  </PatchCreation>

I did a patch install with log, and noticed this:

MSI (s) (18:F0) [17:37:18:316]: File: C:\\Location\\Website.Web.dll; Won't Overwrite; Won't patch; Existing file is of an equal version

I've been scouring the net for answers and haven't found a fix for this.

Thank you very much.

The clue is in the message! Service packs, patches, hotfixes all depend on updating binaries based on the file version. Not only does this speed things up by not installing files that don't need changing, it ensures that you don't overwrite a higher version with an old version. Creation dates (as in the idea that a file should be replaced because mine is newer) do not apply. File versiions are also useful for identifying whether a client has an up-to-date version. So increment the file version, and if it's managed code you don't need to change AssemblyVersion, just add an AssemblyFileVersion for the files that have actually been changed, incremented above the existing installed versions.

https://msdn.microsoft.com/en-us/library/aa367835(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM