[wix-users] C# dll not updating unless assembly version changes
Christopher Painter
chrpai at iswix.com
Fri Feb 17 04:45:29 PST 2017
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).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367835(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371197(v=vs.85).aspx
________________________________
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
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant
More information about the wix-users
mailing list