RemovePerviousVersion does not appear to work!?

N

N4709L

We have used the Setup Wizard within our VB.NET Solution to create a
setup.exe. In the Setup properties we've set the property
RemovePreviousVersions to True. Then, when we select Project, Install from
the menu bar in the VisualStudio development environment it uninstalls the
current installation and then proceeds to install the newer version. That's
exactly what we expect to happen.

However, outside of the development environment, if we run the Setup.exe
that was generated, it complains when there's an earlier version already
installed. It gives us an error message: "Another version of this product is
already installed. Installation of this version cannot continue. To
configure or remove the existing version of this product, use Add/Remove
Programs on the Control Panel."

That's unexpected! Indeed, what we had hoped would happen is that the option
RemovePreviousVersions=True would have cause the Windows Installer to
automatically proceed to remove the current version and install the new one
without bothering the customer to use Add/Remove Programs.

Can you explain how to accomplish the automatic removal of previous
versions, so that one does not need to use Add/Remove Programs to uninstall
the prior older version of the application?

Thanks, -Ron
 
N

N4709L

Thanks, Brian. That works wonderfully. And now I have another excellent Web
site to go to for assistance! knowdotnet.com!

Each time we increment the Version property in the Setup project, should we
answer Yes when it asks if we want to assign a new Product Code and Package
Code? It is the same product, so one would think the answer is No, but the
documentation isn't so clear on this point. It is also a new "package" but
only a new version of the package for this product. Thus, I'd be inclined to
answer No, but the default and recommendation is Yes!

There is an AssemblyVersion in AssemblyInfo.vb. Should we keep the two
Version numbers in sync? In other words, if the Version property of Setup is
8.1.4 Should we use:
<Assembly: AssemblyVersion("8.1.4.*")>

?

Thanks, -Ron
 
B

Brian Davis

The AssemblyVersion in AssemblyInfo.vb is for a Project, while the Version
property is for the Setup Project. You can keep them synchronized if you
want, but you may want to increment them separately. For instance, if you
did not change your Project at all, but you did change some of the files
that were included with your Setup Project or changed the directory in which
it installs, then you may want to increment the Version of the Setup Project
while leaving the AssemblyVersion of your project alone. Also keep in mind
that there may be several projects in a solution, each with their own
AssemblyVersion. These version numbers may all be different.

From what I understand about the Product and Package Codes, you should
increment them as well to insure that the older version of your app is
removed and replaced with the newer version.


Brian Davis
www.knowdotnet.com
 
N

N4709L

Thanks. That answers all my questions, and we've implemented what you've
said and it all works great! Thanks a bunch! Case closed!
-Ron
 
Joined
Jul 24, 2007
Messages
3
Reaction score
0
RemovePreviousVersion does not appear to work?

Hi ,
I am also facing same problem and when i increased my project setup version then it is installing one more copy on my system.Can you please guide me how to solve . Thanks in advance

- Deepak

N4709L said:
Thanks. That answers all my questions, and we've implemented what you've
said and it all works great! Thanks a bunch! Case closed!
-Ron

"Brian Davis" <@> wrote in message
news:OyWqn%[email protected]...
> The AssemblyVersion in AssemblyInfo.vb is for a Project, while the Version
> property is for the Setup Project. You can keep them synchronized if you
> want, but you may want to increment them separately. For instance, if you
> did not change your Project at all, but you did change some of the files
> that were included with your Setup Project or changed the directory in

which
> it installs, then you may want to increment the Version of the Setup

Project
> while leaving the AssemblyVersion of your project alone. Also keep in

mind
> that there may be several projects in a solution, each with their own
> AssemblyVersion. These version numbers may all be different.
>
> From what I understand about the Product and Package Codes, you should
> increment them as well to insure that the older version of your app is
> removed and replaced with the newer version.
>
>
> Brian Davis
> www.knowdotnet.com
>
>
>
> "N4709L" <[email protected]> wrote in message
> news:[email protected]...
> > Thanks, Brian. That works wonderfully. And now I have another excellent

> Web
> > site to go to for assistance! knowdotnet.com!
> >
> > Each time we increment the Version property in the Setup project, should

> we
> > answer Yes when it asks if we want to assign a new Product Code and

> Package
> > Code? It is the same product, so one would think the answer is No, but

the
> > documentation isn't so clear on this point. It is also a new "package"

but
> > only a new version of the package for this product. Thus, I'd be

inclined
> to
> > answer No, but the default and recommendation is Yes!
> >
> > There is an AssemblyVersion in AssemblyInfo.vb. Should we keep the two
> > Version numbers in sync? In other words, if the Version property of

Setup
> is
> > 8.1.4 Should we use:
> > <Assembly: AssemblyVersion("8.1.4.*")>
> >
> > ?
> >
> > Thanks, -Ron
> >

>
>
 
Joined
Jul 24, 2007
Messages
3
Reaction score
0
RemovePreviousVersion

Hi Brian,
I am waiting for your reply. I am facing problem in .net setup.Please guide me. Thanks

----
Deepak


deepakdosaya said:
Hi ,
I am also facing same problem and when i increased my project setup version then it is installing one more copy on my system.Can you please guide me how to solve . Thanks in advance

- Deepak
 
Joined
Aug 21, 2007
Messages
1
Reaction score
0
Continue problem with auto uninstall

First , you did not mention that it then asks you to change the product code.
Yes when you change the product code you do get a new install but if you look in your control panel : add remove programs there is now two instances of your application. Can someone help me truly uninstall my previous application then install the new one?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top