Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was working with C# project and I saved whole project file in two locations with same name. One is in visual studio default location and another is the copy of same project in different drive, The problem is I made many changes in code and saved in default location. Mistakenly I opend the different version which was saved on different drive to check some settings and I close it. Again when I open project from the default location it changes to previous stage. Could you please anyone help me how to recover the latest changes?
Posted
Comments
[no name] 19-Sep-12 14:47pm    
After reading this 50 times, I think I figured out what it is that you want to do. What I think you would need to do is run a file difference on your two projects and add the changes to your "default" project that you mistakenly saved in your copy.
Legor 20-Sep-12 3:47am    
It is very unlikely (almost impossible) that your project was overwritten with the settings (or even sources) from another project. I guess you only think that you opened the first project (which you call default) while you really opened the one you saved in another location again. How did you actually open the project you did changes on? Did you really browse to the location on your harddisk where it should be located and opened the sln file there or did you open it from within Visual Studio (e.g. by using the list of previously opened projects) ?

1 solution

It's time you start using source control, take a look a t GIT source control if you are a single or distributed developer, or you can use SVN for a co-located team.

When in source control you can always "revert" or "check-out" an older version.
 
Share this answer
 
Comments
Manir55 19-Sep-12 14:26pm    
Dear mehdi,

I am not working in group. Im working as a single in single computer. I opened .sln file from different location (in same computer but in different drive rather than default)just to check some previous code and I closed visual studio and again when i open project from default location I found it was changed to the settings(all codes) to the previous stage which was saved to another drive? Kindly help me to get back the latest solution file as its very important
Mehdi Gholam 19-Sep-12 15:10pm    
Since we cannot see your system then it is impossible to help you other than telling you to try Wes Aday's advise.
Legor 20-Sep-12 3:48am    
Also when working alone on a project you should consider using a Code repository in the future as suggested by Mehdi.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900