|
I'm trying to do a minor upgrade from v1.0.1 to 1.0.2 for instance.
I change the version code and visual studio recommends that I change the product code. If I do this though I end up with 2 versions of the software installed. If I don't do it I get an error when I attempt to install telling me that the program is already installed.
How do i get the installer to just overwrite the stuff it needs to without forcing the user to manually uninstall and without them ending up with a ne add/remove programs entry everytime they upgrade?
Cheers,
Russell
|
|
|
|
|
This is typically a nightmare, especially with the under powered installation stuff built into VS. You probably need to buy a real installation tool.
However, what I tend to do, is deploy patches that just replace the exe. I write the path to my exe in the registry, so I can easily write an app that finds the path, and copies in a new exe.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I might end up resorting to something like that but I'll try leppie's approach for the moment as I'm a bit up against it time wise at the moment.
Cheers,
Russell
|
|
|
|
|
Russell Jones wrote: How do i get the installer to just overwrite the stuff it needs to without forcing the user to manually uninstall and without them ending up with a ne add/remove programs entry everytime they upgrade?
After several attempts to get that working back in the haydays of VS2003, I gave up, chose NSIS, and never looked back.
|
|
|
|
|
Thanks leppie,
I played with NSIS a while back, it's pretty cool as I remember I'll take a look.
Do you get it to create packages as part of the build process?
Russell
|
|
|
|
|
It is quite powerful, and sure it could be run from the commandline, but the learning curve for more advanced stuff is a bit high!
|
|
|
|
|
can it add stuff to the GAC, or should i put all the GAC stuff for my app in an msi and add i that way?
|
|
|
|
|
You just use nsExec I think, so you can do exactly what you do on the commandline, also look at the .NET detecting script example, you will probably need that path.
|
|
|
|
|
Seeing you strapped for time, have a look at InnoSetup too, also very flexible, and much easier to learn.
|
|
|
|
|
there's a "RemovePreviousVersions" property that you can set to TRUE to take care of that for you.
|
|
|
|
|
Hi Russell,
I'm pretty sure the answer you need is in the post from Jimmanuel.
One other thing to keep in mind is, when the user runs the newer installer, with the higher numbered installer version, different product code, and RemovePreviousVersions property set to True, the older version is removed then the new one installed.
If the installer is adding Registry entries or other changes beyond just files, they might get undone. There are properties to control some of these things as well.
Good luck!
BDF
A learned fool is more a fool than an ignorant fool.
-- Moliere
|
|
|
|
|
That's not the effect I'm seeing here.
I have removepreviousversions set to true I have updated the version number and the product code and I still have 2 entries in add/remove programs
Russell
|
|
|
|
|
I'm not sure why that would be. I'll give you all the details I can remember from my recent struggle with this issue.
We're using VS 2005 to build the apps and services, written in C# targeting .NET 2.0. The installers are also created with VS 2005. The version scheme I'm using for the product is currently 2.0.4.*. When I have a new build to test, I change the version of the installer from 2.0.400n to 2.0.400n+1. (Unfortunately the installer version is limited to x.x.xxxx rather than the same scheme allowed for the programs.) After I change the installer version number, VS asks me if I want to change the ProductCode. I choose "Yes" keeping my eye on it to make sure it changes. (Always has.)
As discussed earlier, RemovePreviousVersion is set to True. Two other things that I know are involved, which you might want to check, are these. Do not change the UpgradeCode, although it seems like a logical thing to do. Second, the value of DetectNewerInstalledVersion, should be set to True.
(From my mixed-up way of thinking, ProductCode and UpgradeCode should be switched around.)
When the n+1 installer runs, it removes the older files and directories installed by the n installer. It also removes all Registry settings, which is an issue I need to deal with in the future, and it removes its previous entry in the Remove Programs list. The n+1 installer then creates new directories, puts files in them, and adds a few things to the Registry.
Prior to making .msi installers, we were using installers produced by Setup Factory (Version 7.) These .exe installers would simply overwrite existing files on the hard drive with newer ones from its cache of compressed files. I think it's based on the time stamp of the file rather than any version info that may be in the file. I know others have suggested some other alternatives as well.
Hope that helps.
BDF
A learned fool is more a fool than an ignorant fool.
-- Moliere
|
|
|
|
|
how to set font size body color in c# web application(.cs file) in c# codebehind (set this in codebehind not in .aspx ).plz suggest a sol for this.
with regards
priya.
priya
|
|
|
|
|
senpriya wrote: codebehind
I guess you wanted the ASP.NET forum ?
To do this for the whole page, you need to wrap the page in a control, such as a placeholder, so you can set the properties in the style of that control and all it contains. Same as HTML works.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
1. Learn to read, as you are posting it in the wrong forum. Try ASP.NET one instead.
2. Not very hard. But it depends on whether you are using WebControls or HtmlControls, so refer to solution #1 and seek the answer there (with a bit more specific information).
|
|
|
|
|
I am creating a serializer for a class that has an array of type Base, but with objects that are actually of type SubClass1, SubClass2, etc. So, that the serializer knows about these subclasses, I load the dll that contains them, extract them into an array and pass them into the XmlSerializer constructor like so:
s = new XmlSerializer( m_ObjToSerialize.GetType(), extraTypes );
Note that the m_ObjToSerialize type is defined in that same dll.
When the constructor is called, it throws the exception:
Unable to generate a temporary class (result=1).
error CS1704: An assembly with the same simple name 'AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side.
As far as I can figure, when the constructor tries to create the temporary class, it loads the dll again . . . why? When I do the same operation with a different dll (with the object and types coming from the same dll), it works. Anybody have any idea what could be causing the difference?
|
|
|
|
|
Try signing that assembly and see what happens.
|
|
|
|
|
Actually, I'm embarrassed, but the issue was that I was staticly AND dynamically linking the dll. I would have thought that would have caused a problem right away, but it didn't show up until I created the serializer. All fixed now!
Thank you very much for your help.
|
|
|
|
|
Hi,
I need to connect to DB2 database using C#. Is there any namespace in .net2.0 which I may use to connect to DB2 database. kindly help.
Thanks in advance
Sankalp
|
|
|
|
|
The generic ADO.NET classes connect to any ODBC data source.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Right, ODBC if you have a driver. Or a .net connector for it...
Check this out[^]
It seems IBM has one too, but I didn't want to log into their site.
|
|
|
|
|
Is it at all possible to programatically modify the app.config file? I've jumped through all the hoops to add/remove proerties, but when I call the Configuration.Save function, I get this exception:
The configuration file has been changed by another program.
(C:\\Test Apps\\bin\\Debug\\ConsoleApp.EXE.config)
How do I get around that?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Have you looked at this article on reading/writing to App.config[^]? Apparently you can modify it programmatically.
Then again, this MSDN forum post[^] suggests you might have to manually merge some stuff if you've changed the schema.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
I forgot I had a library called Nini (it's on sourceforge) that lets me do this with little/no pain.
This whole thing is retarded. One of the most difficult things you could want to do is to go outside of Microsoft's comfortable little world and try something different. .Net sucks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|