Creating MSP upgrade patch for my WIinForm application does not update my exe.

1.2k Views Asked by At

I have winForm application which run on .NET 3.5. I am using VS 2010 and the my StartUp project "WinFormUI" referes to other libraries.

I have created MSI installer using VS 2010 ( keeping .NET 3.5 ) called the target installer and istalled the application. Add/Remove programs confrim installation of intial version 1.0.0. Installer property RemovePreviousVersion=True.

Now I change my startup project "WinFormUI" by adding a MessageBox("This is updated project") and also changed the assembly version of my startpu project winFormUi.exe to 1.0.0.1 from 1.0.0.0.

Created a second upgraded MSI and changed the installer's Version to 1.0.1 from 1.0.0 but keeping "Product code" same.

Followd steps form http://www.codeproject.com/install/dotnetpatching.asp and http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/7dda2e5f-70df-47d5-a62d-100a2bfd0394.

I have Windows SDK V7.1 which contains MsiMsp.exe Version 5.0 and Ocra Version 5.0.

My PCP file has following data.

ImageFamilies Table : Family -> fam1

MsiPatchSequence Table : PatchFamily -> fam1 ; Sequence -> 1.0.0

Properties Table : MinimumRequiredVersion -> 200 and other columsn

TargetImages Table : IgnoreMissingSrcFiles -> 0 and ohter columsns

UpgradedImages Table : Family -> fam1 and other columsn

Generated MSP using MsiMsp.exe and run using msiexec /p.

It runs the instller (patch). After upgrade Add/Remove program confirm the upgraded version 1.0.1 but the problem is that my changes are not reflected when I run my exe. i.e, I have modified to show a MessageBox("This is updated project").

Am I doing something wrong ? Help required. Thanks.

2

There are 2 best solutions below

0
On

The problem solved when I changed the "File version" of my startup project WinFormUI.exe in Upgraded Project via "Assembly Information" dialog in VS2010. I guess patch upgrade does nothing when File version of target exe is same as upgraded exe (although assembly version and content and file size for both are different as descirbed earlier) Or REINSTALLMODE=dmus should work in this case.

0
On

A patch basically contains the differences between two setups. In order to overwrite files, a difference must be found. It starts with date and size of the file. This criteria might not suffice, that is the moment when versioning and signing comes in usefull.