Phidgets dll versions breaking installers

Supporting Visual Studio on Windows
Post Reply
nm17
Phidgeteer!
Posts: 51
Joined: Mon Nov 27, 2017 3:29 am
Contact:

Phidgets dll versions breaking installers

Post by nm17 »

Hi

The short version: Phidget22.Net.dll needs to have unique (incremental) product version numbers for automated installers to work properly. Currently I believe the product version is always set to 1.0 which causes installers to break when trying to upgrade Phidget22.Net.dll library.

tl;dr

I had a long-standing issue when upgrading Phidgets libraries in my own set-up package. I use Visual Studio Installer Projects to bundle everything 'automatically' and include dll/x86|x64 folders and DLLs.

The issue happens when I upgrade Phidgets drivers, then bundle everything into MSI. The MSI has all the correct version of Phidget22*.dll but when the intaller tries to upgrade previous version of my software it fails to replace Phidgets22.Net.dll as this dll does not seem to have product versioning. This was going on for a while and I had some time today to look into it and found this in the installation logs:

Code: Select all

MSI (s) (50:04) [12:37:25:410]: Executing op: FileCopy(SourceName=PHIDGE~1.DLL|Phidget22.NET.dll,SourceCabKey=_1585AF4CB3CF78F8AB886CB93D6C7798,DestName=Phidget22.NET.dll,Attributes=512,FileSize=305152,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,Version=1.0.0.0,Language=0,InstallMode=58982400,,,,,,,)
MSI (s) (50:04) [12:37:25:410]: File: C:\Program Files (x86)\MyCompany\MyApp\Phidget22.NET.dll;	Won't Overwrite;	Won't patch;	Existing file is of an equal version
The problem appears to be that Phidget22.Net.dll *always* has version set to 1.0.0.0 where it shouold be increased with each release.

Would it be possible to issue new drivers with incremental versioning so the installers can update files automatically?
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidgets dll versions breaking installers

Post by Patrick »

Hi,

Looks like the assembly/file versions weren't being set properly for the Nuget library releases. This is fixed for the next release.

-Patrick
nm17
Phidgeteer!
Posts: 51
Joined: Mon Nov 27, 2017 3:29 am
Contact:

Re: Phidgets dll versions breaking installers

Post by nm17 »

Thanks, I wonder if there is more to it. If you right click on phidgets22.net.dll it will show in details Product version 1.0 but the assembly version will be correct. I think what comes out as product version is AssemblyFileVersion or something on those lines (why Microsoft makes things so complicated is beyond me) which I guess you need to set at compile time (?).

I will test and revert back in next release. I have for now swapped to a less opinionated installer 🙂
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidgets dll versions breaking installers

Post by Patrick »

That's right, the assembly version has always been set properly, but a quirk in how the nuget version of the assemblies was being built failed to set the file version to match the assembly version. The version installed by our .msi does have that file version set properly.

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests