I had some changes on my local file but by mistake I took latest version from TFS. Now my changes have been lost. What can I do to take my unchange copy back? Please suggest.
Nothing. If you didn't commit your changes, they're gone.
Unless you added your previous changes to a shelveset (which is unlikely, otherwise you'd know they're there), your changes are gone.
Further reading, in case you don't know what a shelveset is:
What is shelving?
What is the purpose of a shelveset?
Though Daniel's answer is perfect one for the question, I want to share something with others who might face the same situation as mine. As I got latest version from TFS, new files were giving giving compilation errors hence there was change in source files but not in dlls. After surfing around I have found ILSpy link which helped to to recover my source code.
Related
I am not sure why but sometimes my SVN project seems like it is not synced to SVN: the exclamations (!) on the folders go away and now i can't tell which folders I have made changes to.
I can still commit my files, but it makes it difficult to keep up with the changes I have made on the files. The files seem like they aren't even added to the project as if I copied/pasted them in there but haven't added/committed them yet.
Has anyone had the same problem?
Yes I have that problem all the time. I don't think there is a solution for it. Sometimes if I refresh the folder it updates it to green check mark but this is something tortoise needs to work on. I definitely feel your pain.
After restarting my computer, the icons showed up again..originally i restarted and it did not work, but after a while i restarted again and this time the icons came back.
I made some changes to my ASP.NET MVC 4 project that introduced a bug, so I wanted to rollback my project to the last check-in. This check-in works; it doesn't have any broken code. So I used the "Get Specific Version" option, navigated to my last check-in, and rolled it back.
It doesn't revert my code to my last check-in's code. It just puts a little red check mark next to all of the files that contain my broken code with a tooltip saying "Checked out to me".
So I decided to rollback to my very first check-in. Some conflicts auto-resolve; I keep all of the server's versions of files when it prompts me to. It doesn't revert my code to my very first check-in's code. What am I missing; how do I load the code from my last successful check-in?
I ended up figuring out how to fix this myself: after navigating to View > Team Explorer, I had eight Pending Changes that were hidden. Manually right-clicking these and selecting "Undo" reverted the files to the last successful check-in. Pretty basic stuff, but I figured I would post an answer rather than deleting my question entirely, because the process is a little confusing for a beginner (like myself).
Actually quite a simple issue. I have been using a slow laptop to develop on VS2012, and I setup a screamer to develop on now. No change in versions, etc., just doing it all on a different machine.
To be honest, I haven't even copied the Projects folder yet, as I'm not sure if there wold be project-specific options that would be reset/broken.
To be clear, the new 2012 is Ultimate, and I haven't even tried to migrate. There have been a LOT of options/features added to my existing projects & solutions, so it may not be as simple as copy/paste the Projects folder.
What are your thoughts?
#Peter and #JohnnyHK,
You both were right. I was putting this off on a new machine for fear that I'd need to remember a ton of things I hadn't documented in the Solution (and projects under it-about 20).
So I was already using subversion on the old machine, so I added VisualSVN/Tortoise and checked out a copy of the solution to the new Projects folder. There were like 350 errors & more warnings! Yikes!
But I went through them very quickly and it is clean now. One thing that I noticed in the process was that VS2012 is a little 'broken' when it comes to project (on-web) references. NuGet was actually amazing in that as soon as I fired up the Package Console, it went along, finding & installing all the packages & dependencies! :)
I enabled Show All Files, then opened the References tree node, and noted the ones with little yellow "X"s next to them. In the good side, ones that were not needed (I added them, but created just clutter) were good to see & delete. BUT, there were mostly errors from references that had references to DLLs that were actually in the right place, and when I left clicked on the reference with the error icon, the error would simply go away. Weird, but preferable...
The strangest ones were reference to DLLs that were where they were supposed to be (I'd make a .\lib directory in the project, a la *NIX style, and throw all DLLs for that project in there), BUT I had to delete the reference in error (even though the project was pointing to the right file/location) and then re-browse for it, adding it again, and all errors went away.
All in all, I was pretty impressed with the ease-even with the weirdness-it went. Once I saw how the references were broken, I just went into each project & treated each one. Let me be clear for anyone doing a mass WPF migration: If I had started with the first project and worked to the end one, and ONLY fixed the References issues, I would have been done in 5 minutes-includes time for NuGet to auto-load.
I will not lie; This was the first big migration of a solution to a new machine, and when I saw like 700 warnings/errors, I thought "There goes another weekend!", but I will warn those in this situation to NOT go into source code and try to fix each red underline. You will break things!
This is really frustrating, I am using Visual Studio 2012 for C++ for a project, and it worked fine for a while. Then out of the blue, it started having problems.
The build function does not update the project anymore. I need to do a REBUILD every time I modify anything in my project.
I have looked all over for a solution, but none helped. First of all, I didn't change any settings, but I looked anyway. Tools/Options/Build&Run, Project/Config Manager, you name it I have checked it. It doesn't look like it's a settings problem.
Another thing though, on other forums, I have read that this MIGHT be because of a bad include, that the file included is not there anymore, or something like that. But that is not possible either since I didn't delete any file from the project. But, this problem seems more plausible since, the project at a much earlier stage, had less includes, and it still works.
So, can you help me solve this problem? It is really annoying since most of the solutions out there are NOT working!
Whenever I have run into an issue like this it is usually something like missing project dependencies. You may want to take a look at "Build Solution" not working in Visual C++ anymore. If you are able to share your solution someone may be able to take a look at it.
I work with a shared SVN. Occasionally, there's a problem with the latest HEAD build, and I need to rollback to a previous version that works while it's being fixed.
I do this by going into the SVN logs, right-click on the revision and select "Revert to this revision", as described here: http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-howto-rollback.html
When the problem is fixed, how do I go back to the HEAD version (i.e. undo the rollback)? Updating does nothing. The only ways I have are a) deleting all my files and doing a fresh checkout, or b) going to the commit dialog and individually reverting my files (which brings them up to the HEAD version).
This seems pretty awkward and broken, so is there a better way of doing this?
Sounds like what you actually want to do is "Update to revision...", not actually a revert operation. If you know the HEAD (or revision X) is broken, right-click and use "Update to revision..." to update to the latest working revision number. When you're ready to update back to HEAD again just do a normal update. Think that should work anyway!
Edit: Note that I've not actually tried this, but sounds workable to me.