Groups | Blog | Home
all groups > visual studio .net setup > march 2007 >

visual studio .net setup : VS2003 Windows Deployment Problem



Dano
3/30/2007 8:06:00 AM
I have created a windows setup for my .net 1.1
app. when i run the msi on a new(never been installed before) xp sp2
image(virtual pc), it installs correctly.
When I make changes to the app and create a new deployment project, i change
the version number which then prompts me to change the product and package
codes. I do so and create the package. If i uninstall the app on the xp
image
and then run this new msi, it installs the old files. If i make another
new xp image and run the same msi, the new files are present. So I know
the new files are in the msi, but for some reason the old files are being
used instead.
The other thing I tried was installing it from the add/remove programs as
opposed to just running it. I received the same results.
Phil Wilson
3/30/2007 10:46:46 AM
Have you got RemovePreviousVersions set?
--
--
Phil Wilson
[MVP Windows Installer]

[quoted text, click to view]

Dano
3/30/2007 11:06:03 AM
Yes I do. When I unistall it before i install the new package, the files are
gone.

I cant fathom where its find the old files to re-install.

Again, the steps are
Install for the first time.
Uninstall. (the files are removed from the app directory)
Delete old msi
Download new install with updated exe and dlls
run the new msi
the old files are used instead of the new files. (where they are coming from
i have no idea)
If i take that new install and install it on a machine that has never had it
installed before, the new files are there



[quoted text, click to view]
stcheng NO[at]SPAM online.microsoft.com
4/2/2007 12:00:00 AM
Hi Dano,

Regarding on the issue, I'd like to confirm the following things in
addition to the repro steps you provided:

1. You're using the VS 2003 setup project to create the msi package for
your 1.1 application

2. the exe and dll (that suffer the version issue) are embeded in the setup
project as normal content (in File view...) correct?

3. When you update the exe and dll, did you increase their version
number(such as it be auto increased when perform building)?

If the above ones are correct, I'll try performing some local test on my
side to verify this behavior.

Please let me know if there is anything I misunderstand.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Dano
4/2/2007 9:42:01 AM
[quoted text, click to view]
1) correct

[quoted text, click to view]
2) they are primary outputs that are included in the application folder.
they go into the applications folder

[quoted text, click to view]
3) I believe so, each has the following in their assemblyinfo.cs:
[assembly: AssemblyVersion("1.0.*")]
My understanding is that this is enough.


Thanks
[quoted text, click to view]
stcheng NO[at]SPAM online.microsoft.com
4/3/2007 12:00:00 AM
Hi Dano,

Thanks for your reply.

I have performed some test on my side and did found something which maybe
helpful on this problem:

1. I did repro the behavior through the following steps(use vs 2003):

** create a solution that contains a winform and class library
project(leave their version setting as "1.0.*" as default...), the winform
reference the class library project.

** create a setup project whch reference the winform project's primary
output

** build the solution and the setup project and run the setup msi, check
the version number and uninstall the installed program

** rebuild the solution and redo the install against the setup msi, found
that the old exe/dll are installed.


2. The above behavior is caused by the solution's build setting. By
default, the solution's build configuration doesn't include the setup
project. So when you rebuild the solution, it won't build the "setup
project" together, you need to explicitly build it. In my above test, after
I explicitly build the setup project again, the setup msi can correctly
install the new changed winform exe/dll assemblies. You can also test this
to verify whether your problem is also caused by this.

If this is the case, I suggest you consider the following means to update
the msi whenver you've updated the main application/dependency assemblies:

1) Always explicitly rebuild the setup project after the main application
assemlies (primary output have changed)

2) you can change the solution's build configuration to let it
automatically rebuild the setup project also when you rebuild the solution.

--Choose "Build---> Configuration Manager...." menu item
--in the popup dialog, check the "Build" option of your setup project in
the project list

Hope this helps. If there is anything unclear, please feel free to let me
know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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







































Dano
4/3/2007 12:52:01 PM
this did not solve my problem. I get the same thing.
If i take this exact same msi and run it on a "virgin" image it installs the
correct files.
High level steps:

Dev Machine
1) Change version number
2) prompts for and I accept new guids
3) Rebuild Solution

Image 1 (has had a version of the install ran before)
1) Download the new msi
2) run install
3) old files appear

Image 2 (never had a version of the install ran before)
1) download same msi as on image 1
2) run install
3) proper files appear

Both images download the same msi and yet 2 different sets of files appear.

Thanks
Dano

[quoted text, click to view]
stcheng NO[at]SPAM online.microsoft.com
4/6/2007 2:45:30 AM
Hi Dano,

So the problem still remain on your side, that seems a bit unexpected. Can
you repro the same behavior on multiple boxes?

Also, for the following step:


Dev Machine
1) Change version number
2) prompts for and I accept new guids
3) Rebuild Solution
========================
Would you explain further on the "prompts for and accept new guids"? Are
you also changing setup project/MSI's version? In my local test, I only
change .net application's assembly version and the MSI package works
correctly.

If possible, would you provide me a simplified repro package (a solution
with test .net application and setup program so that I can test on my
side)?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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












AddThis Social Bookmark Button