How to disable automatic check out from Visual Studio 2012? - visual-studio-2012

Whenever I open any solution in VS2012 from local path (which is mapped in TFS), the files are automatically checking out. I want to disable this feature.
I tried to disconnect from TFS and to work on it, But it is closing the solution. Plesase help me out in achieving this. I didn't get this problem before when I was using VS2010

You need to unbind your project(s) from TFS source control.
Select the project or solution from the Solution Explorer
From the main menu select File->Source Control->Advanced->Change Source Control...
Select one or all projects and press the "Unbind" button on the top of the dialog
select ok to the warning popup
You can later bind the projects again, personally I don't do this so I can't say how well it works. I found some more info here
Here are the visual steps:
This brings up the dialog to select projects to bind/unbind.
I had to select one at a time.
Select "Unbind" for each project
Here's what it should look like when unbound.
You can later come back and bind the projects again and TFS will try and reconcile your changes.

Try rather change Checked-in items (Saving, Editing) to 'Prompt for check out'
Tools -> Options -> Source Control -> Enviroment -> Checked-in items

Disable the following option. It should solve your problem.
Tools -> Options -> Source Control -> Enviroment -> Get everything when a solution or project is opened

Related

Android Studio Resetting Changes to Default Code Style

I'm here today because I'm having an issue with Android Studio. I don't know if it existed on previous versions (I don't remember this being an issue, so I doubt it was a problem on a previous version), but currently I am using the Android Studio V2.1 Stable release.
My issue is that if I launch Android Studio (I happen to be on Windows, 64-bit Android Studio) and at the Start Screen/Page, I click Configure>Settings>Editor>Code Styles, and change the default parameters on any of the languages (XML, Java, HTML, etc.), the Default profile is copied to a new profile (Default(1)) and the new settings get applied to each profile.
If I Apply these changes and exit Android Studio, and launch back up and follow the same method...the settings have completely gone back to what they were before I changed them, with the exception of the Default(1) copy profile. But from my experience, Android Studio doesn't build new projects based on this Default(1) copy profile, it builds them on the Default profile. Which means all of my adjustments to using indents and not spaces, keeping indents on empty lines, etc. all do not get carried through to the actual project files, leaving me to have to go back into the settings with the project loaded up and change all of these parameters again. That's just asinine. Please tell me I'm missing something here and that there's a simpler way of achieving the ability to keep a code style template that I can use on all of my projects!
Perhaps it would be better to report or consult on this using the Android Studio feedback site. If that's the better option, I'm willing to do that too.
Thanks everyone!
What I do in that case is
Go to Preferences
Code Style
Select scheme you want
Click Settings cog
Click copy to project
Some OKs and then it works.
After selecting the code style that i want, opened the gradle.properties file in root folder of the project and deleted the following line
kotlin.code.style=official
deleting the above line, prevents the code style resetting to default.
Go to Preferences
Code Style
Set Scheme to Default [IDE]
Click restore defaults
The simplest way I found to reset the default settings is as follows:
In Android Studio, click on File.
Settings (Ctrl + Alt + S)
Under Editor in settings
Select Code Style
Next to Scheme: select the three dots to access the scheme options ()
Select Restore Defaults
A Confirmation Dialog Box will be displayed to confirm if you want to revert back to
the default settings.

Visual Studio 2013 Edit and Continue not working

With VS2013 Pro I am not able to use "Edit and Continue" when debugging an MFC program. I created a new MFC project to test.
OS is Windows 7 64-bit and I'm running Visual Studio 2013 12.0.30110.00 Update1.
Under Tools->Options->Debugging->Edit and Continue I have Enable Edit and Continue checked. I have unchecked it and checked it, but whenever I modify the code while debugging I get the following message:
The source file has changed. It no longer matches the version of the file used to build the application being debugged.
Basically I haven't changed any settings except for the tab sizes and I've set the keyboard mapping scheme to VC6.
What setting am I missing to enable edit and continue?
Edit and Continue is disabled for native code by default. To enable:
On the Tools menu, click Options.
In the Options dialog box, open the Debugging node, and select the Edit and Continue category.
In the Native-only options group, select Enable native Edit and Continue
Edit:
Steps to test native Edit and Continue is working:
Start VS 2013
Create a new MFC project:
FILE->New Project->MFC Application->OK.
Select Finish on the MFC Application Wizard.
Build and start debugging:
BUILD->Build Solution
DEBUG->Start Debugging
Break into the program:
DEBUG->Break all
Make a code change:
Open OutputWnd.cpp and find COutputWnd::OnSize (Line 80)
Insert this line at the start of the function: cx = cx / 2;
Continue execution:
DEBUG->Continue
Resize the application window to see the effect of the code change on the Output pane at the bottom. Its width should be half the required size.
Edit and continue is also a Setting for each project.
It must be set in the compiler options under C++ -> General -> Debug Information Format: "Program Database for Edit And Continue (/ZI)"
Also the linker settings must be changed. The linker has to use incremental linking. Linker -> General -> Enable Incremental Linking = Yes or (for VC 2012 users) C++ -> All Options -> Enable Function-Level Linking = Yes (/Gy)
For more information read the MSDN.
The last hint helped, but we had to
set "Image Has Safe exception handlers" = NO(/SAFESEH:NO)
in all projects of our solution!
I did all steps described above, but nothing helps (thanks all for it).
My solution was:
Project -> Properties -> Linker -> Advanced:
set
"Image Has Safe exception handlers" = NO(/SAFESEH:NO)
Apply, Ok, and Rebuild project.
Hope it helps.
For what it's worth I've been pulling my hair out on this one as well. I finally got edit and continue working by changing the following setting:
Project > Properties > Linker > All Options > "image has safe exception handlers".
It was set to No (/SAFESEH:NO). I went in and deleted it. I didn't set it to YES, or NO. I simply kept it blank. I would love to know what it means to be blank. But edit and continue is now working for me. Maybe it will help for you.
A project with a "Release Configuration" will disable Edit and Continue.
To change this
Open "Configuration Manager"
Change Configuration for the project from Release to Debug
Rebuild and debug project
Edit and Continue will also not work if your project's Platform Toolset is set to Visual Studio 2012 (v110), instead of the usual Visual Studio 2013 (v120).
This setting is in Project > Configuration Properties > General > Platform Toolset.
The solution of this problem is on the Microsoft Documentation...
If IntelliTrace is enabled and you collect both IntelliTrace events and call information, Edit and Continue is disabled.
On Visual studios' menu go on Tools>>options - Select "IntelliTrace" tab and let IntelliTrace events only checked.. Save, restart the visual studio and.......
Your Edit and Continue will work again!

Hotkey to open TFS Source Control Explorer in Visual Studio 2012?

Currently I have to open Team Explorer and click on Source Control Explorer as below snapshot.
I do this very often and need a hotkey for that.
What is it then?
Try with below step:
Go to Options of Tools menu
Select the Keyboard from Environment
Select View.TfsSourceControlExplorer from Show commands containing:. You can type View.TFS in the textbox to filter the list.
Enter your hotkey in Press shorcut keys => click on Assign
Hope it helps!
According to a comment that I found in the site that #Adarsh mentioned, Alt+V,E,S will open the Source Control Explorer. It's a couple extra keystrokes but it works for me!
You can use Ctrl+0,P to open the Pending Changes Window.
You can find all the shortcuts for team Explorer on this blog: http://blogs.msdn.com/b/buckh/archive/2012/06/06/team-explorer-2012-keyboard-shortcuts.aspx
Update:
In Visual Studio 2013 Ctrl+0,P doesn't seem to work to open Pending Changes, but you can use Alt-V,E,H or configure a custom shortcut in the menu Tools/Options/Environment/Keyboard.
Just wanted to share another alternative I learned. One could set an alias in VS Command Window and launch it from there.
alias sce View.TfsSourceControlExplorer
note- 'sce' is an alias of your choice. I generally abbreviate. Obvious but having a pattern will be helpful if you have many of these.
Steps:
Open command window (ctrl+alt+A)
Set the alias (the statement shown
above)
Next time you need to launch the Source Control Explorer,
switch/launch command window and type your alias name. 'sce' in the
above example.
Alt+V,E,S works for me even in VS 2015
In case you like to see more shortcuts, please visit this site
http://visualstudioshortcuts.com
IN VS 2015
Toolbar=>Team=> Manage Connections =>(window like solution explorer will open on right side) Team Explorer- Connect=> Beneath the home symbol ==> Click "Connect"=>Click "Source Control Explorer"

visual studio 2010 not opening projects

i just installed visual studio 2010 and it is not opening any projects .I can make projects but i can not add any file in it and also it is not opening recent projects.
I am stuck here , kindly cooperate with me!
OK, sounds like the installaion got munged up.
first obvious questions: do you have any code that has actually been saved?
If "yes," copy that code to an alternate location, and use the simplest solution: use the Windows Control Panel to deinstall the MSVC instance and reinstall. If no code saved, just de-install and reinstall.
That's the obvious answer. You may also check the location for the project files, and the settings Visual Studios uses.
from the toolbar, click "tools".
From the drop-down list select "options"
Within the displayed list, scroll down to "projects and solutions"
expand that list (click on the little "+" box)
3 locations will be displayed.
Make sure you have write permission to all three locations
all the check boxes should be selected. Especially the one marked "save new projects when created"
click "OK" to accept the changes

Visual Studio 2012 not recognizing all pending changes?

I'm working in TFS with my team for project and the problem occurs when I'm trying to make new modeling project for my classes, it doesn't show up in pending changes.
So here is how I go:
First I enter my folder where I keep my classes. I've tried from there many combinations: I've tried first right-clicking on my folder and putting "check-out for edit" and then continued to * (see later); next I've tried clicking on .csproj of my classes so I activate my project when I'll be adding modeling project and then moved to *; last I tried to activate whole solution of our whole projects which is connecting them and then to moved to *.
None of it worked. (I was always having last version)
here is what I did next for all the possibilities:
I went to Architecture -> New diagram (named diagram and left create new project) -> Create (then windows shows up for creating new project in which folder and I always select my folder where I keep my classes).
After when that was done, I went to check to "pending changes" in Team Explorer, because there should be some available since I created already Modeling project. But there was none. Since I couldn't do it like that, the last solution how I made it was by right-clicking to Source-control Explorer on my project and going to Add items to folder and selected my project which was created locally where I wanted it to be created.
But, this last solution was giving me errors while trying to open my modeling project after. I know I should activate first modeling project, so I clicked to .modelproj and while clicking to it, it was giving me this "notice" or rather "warning":
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?
--
What am I doing wrong? Why solutions are not integrated by default while creating my project (my friends are doing it automatically, they don't need to right-click in Source Control Explorer to add item to be able to see pending changes)?
I hope I made myself understandable.
It looks like your solution binding is broken. Either click yes on the question to bind your solution to source control, this is information that must be stored in the solution file and while Visual Studio does see that the folder is mapped to source control, it also sees that your solution isn't (did you check the add solution to source control checkbox when you created it?)
Optionally try opening file -> Source Control -> (optionally) Advanced -> Manage Source Control. You can select project in your solution individually and then click the bind button on the toolbar to bind them to sourcecontrol manually.
I had a similar issue and, in my case, the solution was to right click on my project and choose Source Control->Go online. Apparently I must have somehow been switched to the offline mode.
I have successfully checked in files from source control explorer instead of solution explorer in this case. Then after that it has worked again
VIEW > Other Windows > Source Control Explorer
Other way to do it:
File--> Source Control --> Advance --> Change Source Control.
In the window displayed select all the projects you want to bind to the TFS
I had the same issue and solve it by clicking:
File -> Source Control -> Advanced -> Refresh Status
In VS2013+, you can check if your solution is online. In my case, due to VSO service outage, my solutions went offline. I had to open the solution, File > Source Control > Go Online.

Resources