Visual Studio Setup Project

  • Thread starter Thread starter Peter Larsen [CPH]
  • Start date Start date
P

Peter Larsen [CPH]

Hi,

I have a .Net 3,5 solution with a winform project, some class libraries and
an installer project (setup).
I'm using Visual Studio 2008.

My problem is that the installer doesn't install all files every time.
It seems like the installer looks at each file, to see whether this file is
newer (higher version no) than the existing or not. If it isn't a newer
version number, it won't install it.

What i want is this - if the exe file is newer, then it should install ALL
files.
Is that possible ?

Thank you in advance.

Best Regards
Peter
 
This is a standard rule of installations, that lower versions do not replace
higher versions. It's nothing to do with newer - it's version based. Think
about how things like service packs, MS update and patches work, it's all
about versions and always has been. The RemovePreviousVersions behavior
changed in VS 2008, and that made updates version based. Previously the
entire product was uninstalled first, and then the new product was
installed. Maybe that's what made you think there was a "newer date" thing
going on.
 
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.
 
Hi Phil and thanks for your comments.

When i say "newer", i meant higher version number.

The problem is, that my project includes several dll's created by others and
i don't want to check everytime whether they remembered to upgrade the
version number or not.
Thats why it would be nice if i just could force it to install everything.

I know we should configure source-safe (we use subversion) to use modules
because it would force everybody to use version numbers plus it would help
me to avoid upgrades that i don't want/need. But that's a future project.

Thanks for the link.

/Peter
 
You are welcome, Peter.

Please feel free to contact us if you still have questions. Thanks.

Have a nice day.

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).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top