[wix-users] C# dll not updating unless assembly version changes
Christopher Painter
chrpai at iswix.com
Fri Feb 17 16:29:46 PST 2017
Depends on where RemoveExistingProducts is scheduled.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371197(v=vs.85).aspx
RemoveExistingProducts Action (Windows)<https://msdn.microsoft.com/en-us/library/windows/desktop/aa371197(v=vs.85).aspx>
msdn.microsoft.com
The RemoveExistingProducts action goes through the product codes listed in the ActionProperty column of the Upgrade table and removes the products in sequence by ...
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Stewart Lynch <stewartlynch8 at gmail.com>
Sent: Friday, February 17, 2017 7:28 AM
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] C# dll not updating unless assembly version changes
Regarding RemoveExistingProducts, I'm using MajorUpgrade, which I believe
handles this?
Stewart.
-----Original Message-----
From: Stewart Lynch [mailto:stewartlynch8 at gmail.com]
Sent: 17 February 2017 13:19
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: RE: [wix-users] C# dll not updating unless assembly version changes
I'm currently doing a minor update. When updating I'm changing the product
id and the minor version, for example 1.4.4.0 to 1.4.5.0.
<Product Id="7fc61963-642b-41f9-81df-e4b09b575645" Name="FramePro"
Language="1033" Version="1.4.4.0" Manufacturer="PureDevSoftware"
UpgradeCode="31265ae2-5461-434c-8087-27bebf221529">
I don't have RemoveExistingProducts in my xml, although the installer does
seem to uninstall the old version, I get an uninstalling... message at the
end of my installer. I'll check this though.
Ok, thanks for confirming that I should be updating the assembly versions,
I'll carry on doing that.
The only reason I thought that it might be a bug was that the behaviour was
a little strange in that it didn't update with an install, but did with a
repair. I'd expect it to be consistent in both install and repair. I do
appreciate it could just be the way msi works when it doesn't get a file
version change, and "gets confused".
Thanks for the explanation and the links.
Stewart.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Christopher Painter
Sent: 17 February 2017 12:45
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] C# dll not updating unless assembly version changes
Are you doing major upgrades or minor upgrades. If major, where do you have
RemoveExistingProducts scheduled?
#1 WiX can't have a bug because WiX doesn't install your files. It creates
the Windows Installer Database that MSIEXEC uses to install your files.
MSI is likely behaving exactly as designed. (It has nearly 20 years track
record. )
#2 You should be updating the AssemblyFileVersion attribute every time you
rebuild your DLL before it goes to the installer. MSI is trying to be
smart and efficient about what files to overwrite and you are confusing it
because it doesn't expect DLL original and DLL new to have different code
internally and yet same version # externally. AssemblyVersion is a .NET
concept for strong name comparison and is ignored my MSI.
Here are a few MSDN topics to help fill in any details I left out:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368267(v=vs.85).a
spx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367835(v=vs.85).a
spx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371197(v=vs.85).a
spx
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of
Stewart Lynch <stewartlynch8 at gmail.com>
Sent: Friday, February 17, 2017 6:35 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] C# dll not updating unless assembly version changes
Hi,
I have a C# dll which is included in my installer which isn't getting
updated when installing over a pre-existing install. If I then do a repair
install the file does get updated.
The other dlls in my package update fine, the only difference with this one
is that I was not updating the C# AssemblyVersion and AssemblyFileVersion
numbers. If I change the assembly version each time I build a new version it
updates fine.
So, two questions:
1. Is this a bug in Wix where the dll won't update if the assembly
version doesn't change?
2. Should I be updating the assembly version number for my dlls each
time I build a new installer?
I have always updated the assembly version for each install (except for this
dll which I missed) but I've never been sure if this is actually necessary.
This is what my assembly version looks like:
AssemblyInfo.cs
// Version information for an assembly consists of the following four
values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision
Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.58.0.0")]
[assembly: AssemblyFileVersion("1.58.0.0")]
This is my installer xml:
.
<Fragment>
<ComponentGroup Id="FrameProExe_Components"
Directory="INSTALLLOCATION">
<Component
Id='FrameProExe_HDataGrid_dll' Guid='8b81fa3a-e74b-4e7f-93e4-360ca8ac88e6'
Win64='yes' >
<File
Id='FrameProExe_HDataGrid_dll_file' Name='HDataGrid.dll'
Source='..\..\..\Build\FramePro\bin\x64\release\HDataGrid.dll' KeyPath='yes'
/>
</Component>
.
I'm using Wix Toolset v3.10.
Thanks for any help.
Stewart.
PureDev Software
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/ WiX Support | WiX Experts and Resources from
FireGiant<http://www.firegiant.com/>
www.firegiant.com<http://www.firegiant.com>
WiX Support | Installation, Development, Deployment | WiX Experts and
Resources from FireGiant
____________________________________________________________________
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