VS2012 detects change made outside VS and mark files checked out - visual-studio-2012

On my VS2012 I noticed that if i edit a file that is not checked out in a notepad and save it, in TFs it will be marked as checked out and edited. So far we haven't found too much of a problem of it, but potentially people can get careless and make/save changes unintended.
Is there anyway to turn off that feature?

What you're seeing is now default behavior for Local Workspaces. One way to 'undo' this is to set your workspace to a server workspace once more. But I suggest you first investigate the benefits of local workspaces before deciding to turn it off. People still have to check in files, so there is a gate between changing the file and actually committing them to source control.

Related

VS 2019 don't delete files immediately

I accidentally deleted a wrong file in Visual Studio 2019 before commiting the changes. I lost not a lot of work but I want to prevent this in future.
Can I setup VS 2019 somehow that files are not immediately deleted but kept in a cache for a while?
Supposedly there is already a backup folder which VS uses for deleted files, but this folder was empty in my case. And also the fact that VS moves files into the Windows bin doesn't help me because my repository is not on the system drive.
Do you know about any settings in VS or is there maybe an extension?
Not exactly what you are looking for but this extension could help you. It migth not prevent the deletion, but give you the opportunity to recover the code.
I haven`t tested it and I am also not sure if it will work with VS2019.
A visual source code plugin for maintaining local history of files.
Every time you modify a file, a copy of the old contents is kept in the local history. At any time, you can compare a file with any older version from the history. It can help you out when you change or delete a file by accident. The history can also help you out when your workspace has a catastrophic problem. Each file revision is stored in a separate file inside the .history folder of your workspace directory (you can also configure another location, see local-history.path).
https://marketplace.visualstudio.com/items?itemName=xyz.local-history
The answer here is to use a version control system (like git) and keep a full history of your project.
Even on simple personal projects it is worth doing.

Source Control on Domino Designer: Files not getting deleted on on-disk project

A weird one here. I've noticed that the 'Team Development - Sync with On-Disk Project' is not deleting files on my ODP. I'm not using automatic updating.
I've looked at the permissions on the odp/nsf folder, and I've noticed a little grey out checkbox which I can remove, but it pops back up immediately.
I've also tried opening up the security on the folder (right-click/properties/Security) and giving most groups superpowers, but no bananas.
Any help or hint would be appreciated.
Update: the deletions happen, but not immediately. I'm confused.
We have had issues not just with deletion but newly added files received via git, the only solution is to refresh both projects a few times and sync them both.
Another issue: I often lose some project settings, i.e. an additional source folder and a .jar file. It probably has something to do with replication, but it's impossible for me to find out exactly why this is happening.

SVN (command-line under Linux) How to ignore some changes (keep them local only) but commit rest of file

Currently in our repository, there is a conf/ folder that I have svn ignored so as to avoid committing local configuration data. However, now I need to add a new configuration option to this file. From my research, the only answer that seems applicable is to change the project structure and have 'config.conf.default' files that everyone can add new options to, and they must copy that file to 'config.conf' and edit it with their local options and svn ignore it. As this is not my project I am working on I would prefer to find a more 'local' solution if their is one.
Changesets don't seem to be helpful in this situation, and constantly manually backing up, reverting, remaking changes I want sync'd, committing and then restoring each config file doesn't sound fun at all.
I read some posts that TortoiseSVN 1.8+ can do this sort of thing, I'm hoping there's a Linux equivalent.
Looking forward to any advice -- thank you
I do not know for certain, but I will be very surprised to hear that TortoiseSVN can do this. What you are asking for runs counter to everything that SVN (and, I might add, any other version control I'm aware of) works.
A file can be either tracked, in which case any change to it is an interesting change, or untracked, in which case none are. Allowing partially tracked files means the version control cannot know whether the change you just made should or should not be tracked. Allowing this is just asking for trouble.
While, technically, TortoiseSVN might have such a feature as an overlay above SVN, in my experience, that's simply not how Tortoise is built. Their design is very nice in that they are simply an SVN client, honoring the same configurations and semantics as the command line tool (for both Windows and Linux). In fact, the fact that Tortoise, the command line tool and the VisualStudio clients all share the same mode of operation is one of the strong points of the tool set, making the experience of working on Windows just a tiny bit more bearable. I really hope Tortoise have not decided to deviate from that.

How to change TFS workspaces and access associated local code in solution explorer

Just learning about workspaces in TFS/Visual Studio 2012. I am testing using a Dev Branch and a Release Branch. I have setup workspaces that map to each of these branches from the server to the local folders.
Now I was assuming, and maybe incorrectly, that when I changed the current WorkSpace via Source Control Explorer, that since the workspace knows the mappings, it would then switch my Solution Explorer to show the local folder files associated with that workspace. This is not the case. Again, I was thinking it would act like FileZilla when you choose a site bookmark, that it then knows to connect to the server side code and then the corresponding local code....
So how do you actually access the local code in the Dev branch and then switch to the Release branch local code? Do you just have to close the Dev solution, then open the Release solution?
I see that this works, but it is confusing to know which version you are working with as the solution name will be the same when it is displayed in the Solution Explorer. You have to maybe r-click and view the properties of the file paths to see which actual version (Dev or Release) that you have opened. Same issue when opening VS and it lists the same solution name under the Recent section...you have to hover over it to see which version you want to open...all in all, it just seems like there is a decent chance that you could confuse the 2 and start coding in Release when you mean to code in Dev... I know you have to be careful, but this definitely doesn't help.
It would be nice, and maybe I missing this, if from when you first open VS that it would give you the option to open a WORKSPACE instead of a solution/project. At least that way, you can name your workspaces to be meaningfully different.
Unless you have rely big code bases I usually have a single workplace for all of my dev work. That way I just open any solution that I want.
I use workspaces for other tasks, like admin or merging... Or bug fixing on specific versions.

Get last version not working Visual Studio 2012 in TFS

I have Visual Studio 2012 and when I'm trying to get last version it doesn't work and it says that it's says that "All files are up to date". It is because I deleted file locally after I got it from TFS and I guess in Visual Studios memory it's written that there were no changes from that time I got it and now it doesn't let me download it although I don't have it.
How to "tell" VS that my local folder is changed?
P.S. I guess it can be also done with "Get specific version" but that option doesn't appear to me when i right-click on file I want to get from server.
EDIT:
I found that my workspace changed automatically (or rather with me not being concentrated while making new project), so VS was actually checking other directory all the time. For all those who might have the same problem - check your local path and if you see that it's not good, change it.
Here is how you can change it:
http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/d0c6982f-4f5e-4b1c-830b-3af9fb127922/
You are right, TFS saves what version he gaves you and changing/deleting it without to notify TFS, you won't get anything. The "Get Specific Version ..." is what you need. Therefore rightclick on the item you want, in context menu choose "Advanced --> Get Specific Version". Check the second option to "Overwrite all files even if the local version matches the specified version".
Not saying this is a solution, but I had similar issues after remapping one of my projects. Ultimately what I did was delete my local Solution File (.sln) and re-opened the project via the Project File (.vbproj). After that I was able to see all of my latest file versions that appeared to not be down loading. Once you click save on anything it will re-prompt you to save a new solution file.
i don't know if this is specifically what the OP was trying to accomplish, but here's my story: my machine crashed, had to get it reimaged; once VS2015 was installed, i went to source control explorer, right clicked the branch i needed >> Advanced >> Get Specific Version, checked the "Overwrite..." boxes, clicked "Get" and got the "All files up to date..." message. buster. obviously the code was NOT up to date.
fast forward: i fixed this issue by deleting my workspace's pertinent mapping to code base i needed, saved it, and re-added it.
hope this saves some headaches.
You'll want to Get Specific Version and to check the box to enable overwriting of existing files. That will ensure you're actually up to date.
You can also switch from a server worspace to the new local workspace which should also help solve issues like this.

Resources