Hi Guys,
How can we retrieve user.config file of one project in another project have same name of exe but different version number.
Description:
Create a simple windows application with title HappyDay
Store a variable in Settings named as Background and save a background color in it.
Place a button on it when button is clicked the background is changed by accessing Setting's background variable.
Create another project and do same step.
Build those projects.
Now rename the 2nd project exe with name same as 1st Project.
I want to get the configuration of 1st project on 2nd project execution.
Is this possible? If yes, then please detailed me how can it be achieved.
Thanks
Regards,
Itz.Irshad
Loading
Sam HobbsPosted Apr 17, 2012, 2:29 AM
The original question said "another project". One problem that beginners often do is to speak in terms of projects instead of applications. The application is the same, correct? In other words, as far as the installer is concerned, it will update the software to the newer version; in other words, the installer will modify or replace the previous version when the newer version is installed. Right?
It seems to me that the easiest solution for you, the user and the computer is that when the new version is installed, the setup program could read the previous configuration data then write the data in the new configuration. The application itself does not need to know about the previous version, at least not for the configuration data.
Muhammad IrshadPosted Apr 17, 2012, 12:30 AM
Let's make it simple.
I'm going to deploy new version of an application. In essence, it's totally new project but identical to previous application with some new features.
So, My user save his/her preferences in previous application and I store them in user.config file in Local Setings of that user. (As VS do usually)
Now, I'm try to retrieve those settings in my new application. This is to facilitate the user to not mention the preferences again. His/Her previous preferences will be retain in new version.
Note: Application exe have same name as previous application exe.
Now, please guide me how to do that.
Thanks
Itz.Irshad
Sam HobbsPosted Apr 16, 2012, 3:49 PM
It would help to have some hints at least to what your instrutor has taught you. I think it would help if you provided more of what the instructor said than just the problem description that has been provided here.
FroglegPosted Apr 16, 2012, 2:20 PM