Thanks very much for Phil's answer.
Hi Peter,
Thanks for your post. I am Hongye Sun [MSFT] and it is my pleasure to work
with you on this issue.
This is a by design issue. As Phil's said, the RemovePreviousVersions
behavior changed in VS 2008, and that made updates version based. The
update rule is called File Versioning Rules. It is documented at
http://msdn.microsoft.com/en-us/library/aa368599(VS.85).aspx.
The installer will make the determination to copy the files depending on
following properties:
- Version
- Date
- Language
If both files have version, by default, the logic of replacement of file is
documented at
http://msdn.microsoft.com/en-us/library/aa367835(VS.85).aspx
The rule is defined by REINSTALLMODE property in MSI. It is documented at
http://msdn.microsoft.com/en-us/library/aa371182(VS.85).aspx.
Based on these, following are the possible workarounds:
1. Update file version manually
Increase Project properties -> Assembly Information -> File version before
building a setup package.
2. Update file version automatically
Visual Studio setup project does not support it natively. One possible way
is to use MSBuild target to achieve it. Here is an existing tool for you to
reference:
http://code.msdn.microsoft.com/AssemblyInfoTaskvers/Release/ProjectReleases.
aspx?ReleaseId=232
Note: Each of the 4 numbers in the Version string is limited to 65535. You
may need to change the default target file.
3. Change REINSTALLMODE property default value in MSI file
Download ORCA tool from
http://blogs.msdn.com/astebner/archive/2004/07/12/180792.aspx.
Use ORCA to open the target MSI file and add following name and value pair
into Property table:
REINSTALLMODE = amus (omus is default value)
This value will force all files to be reinstalled, regardless of checksum
or version. For detail, please refer to
http://msdn.microsoft.com/en-us/library/aa371182(VS.85).aspx
Please feel free to contact me if you have any question. Thanks.
Regards,
Hongye Sun (
[email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.