How to permanently check in files into Visual Studio 2010? - visual-studio-2010

I'm using Clearcase for source control, and when I right-click on my solution file, there's an option for checking in the files.
Trouble is that immediately after checking in the files, it automatically does a check-out.
How do I keep the files checked in for good?

There should be an option in Visual Studio to prevent an "auto-checkout" after checkins.
However, check also the exact version of ClearCase you are using, because other bugs around checkout/chekin files also exist.
Sure enough, the OP Nav reports in the comment:
The checkbox is in:
Tools > Options > Source Control > Environment > Keep items checked out when checking in
You can see the setting in this article (which was for Team Foundation Server, but which is still relevant for this particular question)

Related

What's the use of binding in TFS

I got the latest version of a Visual Studio solution on TFS. But when I try to open the solution in Visual Studio I get the following message:
Source Control
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
Asking my colleague, I found out that he's been checking in the changes through Visual Studio without any problem.
Here's my question: Considering the fact that I can still check in my changes via IDE, what is the use of binding a Visual Studio solution or project to TFS (or more generally source control)? Except that "lock"/"red tick" icon appearing beside them in Solution Explorer.
Adding Solutions and Projects to Source Control: When you add a solution to source control, the solution becomes part of a dynamic versioning archive created and maintained by the source control provider. Each time someone checks in a new version of the solution, that version becomes part of the archive and is available to other source control users.
According to the warning message, It seems that you are opening from source control a solution that was incorrectly added to source control (it's missing some bindings strings that should have been in the sln or project files). You should click the button yes and Bind the projects correctly to their server location, then OK the dialog. The server file will be checked out and modified locally. You should checkin the changes after that.

Visual Studio 2019 - Auto Check-out certain files

WE have been having this issue with our Visual Studio 2019, certain files are automatically checked-out on all users when they load the company solution.
I am not sure why but it happens to all every user in the company and on all computers, as soon as you load the single solution that we have, files from Multiple projects are checked-out and they are always those 12 files,
When you compare these files with latest version / Server version you see no difference.
AutoCheckedout
BTW we are using Azure-DevOps Server but we had this issue since TFS 2017 Update 2
When Unbinding and rebinding / reloading Project
According to your description, it sounds like the solution isn't “bound” to the version control provider correctly.
From Visual Studio's main File menu, select File > Source Control > Advanced > Change Source Control
You'll see this dialog:
Make sure the server bindings are correct and that each solution/project is “connected”.
If everything looks like fine, then try to unbind any projects that are bound but not working correctly.
Bind all projects again that are now unbound. Which may do the trick.
Hope this helps.

Smart way to add same library/include paths to different projects in Visual Studio

I know the question may seem really noobish, but actually i have pretty huge coding experience, and it's just that i'm pretty new to Visual Studio (installed VS_2017 just few hours ago) and i'm rly struggling with global options now: i can't find a way to specify location of a library(-ies) for different projects.
I know there r 2 options for every project: "C/C++ » General » Additional Include Directories" & "Linker » General » Additional Library Directories", but the thing is that i have 3 libraries (atm) and they used in a bunch of different projects (there will be even more projects loaded via git and they all will be using same 2-3 libs)...
So specifying the same directories for every project manually seems very inefficient to me, but i rly can't find any global option for include/lib paths... I googled 'bout "Tools » Options » Projects and Solutions » VC++ Directories » Include files" but such feature is deprecated in VS 2017.
SO:
i wonder if such feature actually exists in Visual Studio 2017 (or some replacement)
i wonder if there is some sideway like some macro maybe which can add library (previously configured paths) to a project via couple clicks (preferably with RegExp syntax for replacement if there is some path specified for one of libs already)
P.S. i know about Environmental variables in Win OS's, but it's not acceptable for me 'cuz it looks unreasonable to trash it with directories which will be used ONLY by VS IDE!
Consider referring the below MSDN article
https://social.msdn.microsoft.com/Forums/vstudio/en-US/a494abb8-3561-4ebe-9eb0-6f644a679862/visual-studio-2010-professional-how-to-add-include-directory-for-all-projects?forum=vcgeneral
Prior to VS2010, VC++ Directories could have been used, but as you
mentioned that setting is deprecated now.
VC++ Directories are no longer supported in VS2010 through
Tools->Options page. Instead, VS2010 introduces the user settings file
(Microsoft.cpp..users.props) to control global settings
including Global search path. These files are located at
$(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory. Upon
migration to VS2010, the custom settings of VC++ Directories from
VS2005 or VS2008 are migrated to these user files. These global
settings files are imported into all the converted and newly created
projects.
Here are the steps to change the settings file through UI:
· Open up property manager by clicking on View.Property
Manager.
· Expand the project node and then the Configuration|Platform
nodes, you will see "Microsoft.cpp..users" file for each
Configuration|Platform. These are the files for the global settings,
similar to the old tools/Options/VC++ Directories.
· Multi-Select "Microsoft.cpp..users", right click
and bring up the property page window
· In the property page window, click on "VC++ Directories"
(for example) in the left pane, add new paths for the directories such
as "Include Directories". separated by semicolons
· Make sure to save the settings before shutting down Visual
Studio.
· Re-launch Visual Studio and the new settings will be in
effect.
In addition to Sumeet's post, in the Windows Explorer the location of the file could easily be found as
%localappdata%\Microsoft\MSBuild\v4.0
.

Retrieving file from source control?

Hi guys when I open my solution from source control(TFS 2013) in the morning some folders in a class library project does not load but they are in the windows explorer so I had to "Include in project" the folder after showing all files in the solution explorer but there are no contents even though i "Get Lastest(Recursive)" but I checked the web(Tfs) in the code -> explorer there are files shown in the tree view. Is there a problem with tfs? or visual studio? or both? what can I do to resolve this?
Looks like you have files checked-in TFS but your project file in TFS doesn't have those files included. Also, when you get latest from TFS looks like you override the local changes.
I have three(ish) suggestions:
You have the directory with the included files mapped to a different place on your local drive. You can check this my looking at your workspace mappings (File -> Source Control -> Advanced -> Workspaces). If you have more than one workspace then make sure you're using the right one.
You can force TFS to download files that it believes it has already downloaded. Instead of GetLatest, choose Get Specific version (this may be on the same menu or under Advanced - can't remember for 2010). Check Overwright writeable and all files and select Get.
Install TFS Power tools and try adding the files that way (i.e. through windows explorer)
This isn't really a suggestion, as I don't believe it will work, but if the above don't, try it. As above, select get Specific version, but instead of Latest version, select Changeset and choose changeset 1. THIS WILL DELETE ALL FILES IN YOUR WORKSPACE. The do a get latest as normal.
HTH

TFS SCC: How can I get new files listed in the Pending Changes Panel in Visual Studio

We are experimenting to use Microsoft Team Foundation Server Source Code Control as a replacement for SVN.
Therefore, it would be great if the friction for this transition would be minimal.
For example, in SVN, whenever I create new files in the folder, and then use "Tortoise SVN Check for Modifications", I get a master list of Added Files, Deleted Files, and Edited Files.
I know that in TFS SCC in Visual Studio, the equivalent is the Pending Changes Panel. However, this panel only lists Edited Files. How can I get new files listed in that panel, too, just like SVN does?
The workflow really depends on whether you are using Local Workspaces or the traditional Server Workspaces. As you are coming from SVN, Local Workspaces would probably be a good fit.
Local Workspaces (New to TFS 2012)
Local Workspaces are TFS's attempt at DVCS and actually gives you a much more SVN-Like experience. The pending changes window with local workspaces is divided up into the following areas:
Included Changes - This is effectively files that are already in Source Control that have been changed.
Excluded Changes - These are all files within the workspace that are not in source control. This is like your Added files in SVN.
Server Workspaces
Server Workspaces are the traditional TFS workspace approach. An item is not in Source Control until it is explicitly added.
There is a much more detailed article on the differences here: http://msdn.microsoft.com/en-gb/library/bb892960.aspx
Drag and drop your new files into the right folders in the Source Control Explorer in Visual studio and then there will be asked if there are also files that need to be excluded from the source control. If that is done they are in the Pending changes window. The implementation like SVN is starting from Visual studio 2012 but then still it can give issues and not be in that panel.
I see this is an old question but I believe the answer is in Visual Studio's "Pending Changes Panel" itself. Notice the "Excluded Changes (nnn)" section. Just below that heading you should find "Detected: nnn add(s)". You can see your 'new files' listed there.
For what it's worth, I find the "Pending Changes" an unwieldy feature in that it seems it's never context aware. I find that I often have to "weed through" many, many files that are simply not relevant to the solution/project(s) at hand.

Resources