How to make TFS not auto check source control from Visual Studio? - visual-studio-2010

every time I open my Solution in Visual Studio it tries to communicate and validate every file is update to date in source control. I am working on a very large project and was wondering how I could disable it for this Solution? Furthermore is I am curious as to also how to enable it?

In Visual Studio 2010:
1) Go to Tools -> Options -> Source Control -> Environment.
2) In "Source Control Environment Settings," select "Custom" from the drop down.
3) Uncheck "Get everything when a solution or project is opened."
(This is a global setting. It is not Solution-specific.)

You can install the TFS power tools, assuming you use TFS 2010 then you can download them here open up a visual studio command prompt and run the command tfpt connections this will bring up a dialogue which will show all of your available TFS servers and Collections.
There are 2 options you can try, firstly uncheck "Automatically connect to server on startup" this should stop VS trying to connect to TFS when you open a solution. If that doesn't work then click on the "+" next to the TFS server and select the collection you are using for source control. Hit the "Edit" button and you should see a checkbox called "Server is Offline" select this and you will no longer be connected to TFS.
To reverse the behaviour use the same tool to togle the values back to their defaults

Related

No TFS-connection in Visual Studio Solution Explorer

Our project is on Visual Studio Team Services (was TFS Online) and we are using visual studio 2013, but I dont seem to have any connection from Solution Explorer to Team Services.
I have no problem opening Team Explorer-> Source Control Explorer and Get Latest, but when I open the .sln file in visual studio, it seems disconnected to Team Services in the sense that I cant find menu items like "Get Latest", "Check out" and so on. When I create new items in VS they aren't added to Team Services, I have to add them by using Source Control Explorer.
My mappings seems fine, they point to the folders where I have my source code locally.
So, how to I connect my VS to Visual Studio Team Services?
Under Source Control Explorer in VS, double click the .sln file, then go to Solution Explorer to check whether the files under the solution is source controlled.
Additionally, you can go to File--Source Control to see whether you can see "Get latest version" or "Check Out for Edit".
Open the File - Source Control - Manage Source Control and click Bind for each project in the solution.
Also make sure that Team Foundation Server is selected as the version control tools in Tools - Options - Source Control.

Visual Studio 2013 Flexera customer community tab

First of all, they took away the default setup project and give us a 3rd party tool to package ( maybe its a topic for a separate forum), but visual studio keeps opening a new tab with the flexera customer support page(with an irritating javascript error) whenever i have a 'error' in my code .
how can i disable this feature ?
As a workaround, you can go to Solution Properties -> Configuration Properties -> and uncheck the Build action for the setup Project (then close and reopen visual studio).
Later you reactivate it only when setup creation is required.
Another workaround.
Right-click on setup project and choose Unload Project.
When you want to build setup again, use Reload Project.
Not a solution, but another workaround. Edit your hosts file and point that website to localhost. Gets rid of the popups, but not the extra tab in Visual Studio.
1) Run this:
notepad C:\Windows\System32\drivers\etc\hosts
2) Add this text and save the file:
# To get rid of the annoying javascript error popups in Visual Studio
# Example problem URL: http://flexerasoftware.force.com/SupportKBList?searchString=-1014
127.0.0.1 flexerasoftware.force.com
3) Run this:
ipconfig /flushdns
4) Close re-open Visual Studio.
My favorite workaround (10 seconds but must be re-done after each VS2013 restart):
1) Right click the tab and click [Float]
2) Minimize the window and put it in an unused corner of VS 2013

How can I get TFS working again?

Today I checked out a new project in TFS (Visual Studio 2010): Which, if any, folders do I need to create before checking out a TFS project?
The .sln file wouldn't save (said it was read-only, and even when changing that in Windows Explorer, it made no difference).
So, I created a new folder, created a new .sln, and then copied all the other files over to that structure.
Now, somehow, TFS has "given up the ghost" On connecting (I do seem to connect, I can see the projects in the Team Explorer pane), when I 2-click the "Source Control" item below a project, I get, "Team Foundation Server is not your current Source Control plug-in. Click here to set the current Source Control plug-in."
If I do fall for its ploy, I then see, "Error Command "Tools.Options" does not accept arguments or switches."
What in blue blazes is going on?!?
I reinstalled ("repaired", as that was the only option other than uninstall) MSSCCIProvider, but that did no good - I get the same errors. How can I get TFS back?
UPDATE
I am connecting to TFS, because when I open VS and select the "Connect to TFS" (verbiage?) link, it opens the Team Explorer tab, with a visual representation of the TFS server, with the various "areas" below that, and then, for the area I'm currently working on:
Handheld
> Work Items
Reports
> Builds
Source Control
...but when I mash "Source Control," it tells me, "TFS is not your current Source Control plug-in. Click here to set the current Source Control plug-in."
But that's a bait-and-switch, because when I do (click there), I get the err msg, "Error< crlf > Command "Tools.Options" does not accept arguments or switches."
As per my comment, it looks like you have the wrong source control plugin enabled in Visual Studio. In visual studio go to "Tools", "Options", "Source Control"
Make sure that the "Current source control plug-in" is set to "Visual Studio Team Foundation Server"
You should now be able to use Team Explorer to manage your code in TFS

Cannot see go online option in tfs

I opened a solution in offline mode. But now I am trying to go online and connect to tfs but I cannot seem to see the "Go Online" Button under File-> Source Control.
I connected to TFS using Team-> Connect to Team Foundation Server option but I still don't see "Go Online" button in File-> Source Control.
Is there any other way to go online in TFS?
Version used : Visual Studio 2010 Ultimate, connecting Team Foundation Server 2010.
I found out that the "File > Source Control > Go Online" menu item doesn't appear when the "Source Control Explorer" window is active.
So you will have to open a different window and\or file.
In my case, when I opened a .cs file within a project of the open solution, the "Go Online" menu item was available once again.
Try File > Source Control > Change Source Control, and then bind your solutions/projects.
You may have to delete the bindings of existing projects that failed to bind correctly.
Then close the binding dialog.
Now you can add each of the disconnected projects from your solution explorer.
This ranges somewhere between buggy and pathetic, but if you click around on sufficiently many seemingly unrelated menus, context menus, and dialogs, you may guess how to repair the TFS connection like this
This is not ideal, but another option is to close Visual Studio and open it again.
In my case whenever I get disconnected (we use TFS online) then after a drop in connectivity my VS thinks it is still offline, I cant convince it otherwise so when I restart VS it then forces it to check connectivity and then my solution is automatically back "online".
I faced the same problem when i worked on my solution when i was disconnected from tfs.
I unloaded and loaded the project i worked offline and suddenly go online option showed.
I think doing that checks out the project so that unknown bindings are removed.

How to have TFS 2010 detect changes done to files outside of Visual Studio?

I'm using Team Foundation Server 2010 with Visual Studio 2010.
Whenever I modify a file outside of Visual Studio, TFS doesn't seem to detect the change done to the file, and thus doesn't offer me the option to check-in the file after it has been modified.
How can this be solved?
TFS has a "Reconcile" command for this:
Open the Source Control Explorer
Right-click on the folder with the changes and choose Compare
Select the files you want to reconcile (press CTRL+A to select all files)
Click on the Reconcile button
Set the options in the Reconcile Folder Differences dialog. Make sure Files that do not have pending changes is set to Check Out
Click OK
If you have local changes the Check Out dialog will be shown. Set the preferred Lock type
Click Check Out
See also: Reconcile differences between folders
If you have a network connection to your server while you're working outside of Visual Studio, it's probably best to go ahead and check the file out before editing it, either using the tf command line client, or using the Windows Explorer shell integration that's available in the TFS Power Tools release. (Plus an increasing number of other tools have TFS integration that makes this automatic, but if you're just using notepad, this still needs to be a manual step.)
Of course, there are many times when you're working and you don't have a network connection available that allows you to check out the files.
If you know what files you've modified, you can just check them out from within Visual Studio, then you'll be able to check them back in.
If you don't know what files you've edited, you can detect the changes by running the tfpt online command (also part of the Power Tools release). This will locate the files that have been modified locally and check these files out from the server.
This worked for me, using the TFS Power Tools:
tfpt online /adds /deletes /diff /noprompt /recursive directory-name
(where directory-name is the path to the directory to be updated, otherwise it will detect changes throughout your entire TFS repository)
If you want to know what it would do without it actually making any changes, you can force it to do a dry run by adding the /preview switch.
*1- make changes outside of Visual Studio
2- go to Visual Studio and open Source Control Explorer
3- right click on the folder > "Check Out for Edit" > "Check Out"
4- right click on the same folder > "Undo Pending Changes..." > "Undo changes" > "No to All"*
I tested this workaround on a branch and it helped me a lot. But there are only new files and new folder who has to be done manually.
I recommend to create a branch before the operation. It isolates you the time of the operation.
Note: This technique does also the files identical cleanup that TFS always marks as modified.
Try this. It's some sort of workaround, but it works:
make changes outside of Visual Studio
go to Visual Studio and open Source Control Explorer
right click on the folder > "Check Out for Edit" > "Check Out"
right click on the same folder > "Undo Pending Changes..." > "Undo changes" > "No to All"
That's it. The changes are visible now.
There's also another solution to get TFS to figure out the files that have changed outside of Visual Studio:
Open the solution offline
In Solution Explorer select the solution file and then press the Go Online button ()
TFS will automatically scan the solution for changes after this.
Step one can be achieved in a number of different ways. Here are some:
Use the GoOffline Extension - very simple and effective.
If you're asked for TFS credentials when opening the solution (no automatic domain auth), then don't enter the credentials. The solution will open offline and you'll login after pressing the Go Online button
(extreme solution) Disconnect your network cable; Open the solution; Connect the network cable.
Visual Sourcesafe works like this too and the way I get VSS or TFS to notice the change is by checking the file out once inside Visual Studio.
Open Source Control and go to your TFS folder. Right-click on the folder and choose 'Compare'.
Notice that your edited files show up marked in red.
I find this is better than tfpt online which also gets you files that are not readonly and not edited.
I had this problem in the past, when my Internet was down and I worked offline, and most of my changes didn't appears in Team Explorer.
Following these steps:
First, In the solution explorer, select the folder that you want to re-conciliate (for me, it was my entire solution folder), and select Compare...
Click in Modify Filter, and in the filter text-box, you could type:
*.cs;!obj\;!bin\;!packages\;
In this example, it will include in the search only C# files and exclude in the folders: bin, obj and packages.
Notice the column Pending Change has the info whether the file is marked as edit, add, etc... or nothing...
To mark as edit (when the local item has a matching server item), select the file and choose Check out for Edit...
To mark as add (when the local item doesn't have any server item), select the file and choose Add Files
Finally, I am not sure why the projects are not listed here (after I remove *.cs filter, still doesn't show up), so rebuild the solution to make sure the projects updates as well
+ In the solution, click the connect button (if shows up) that said Go Online.
I found that in Visual Studio 2015, with the project open, Visual Studio discovered for itself that files had been modified externally, and automatically checked them out without me having to do anything. Checking in the project in the normal way saved the external modifications.
In my case, the following worked (at least the one time I tried it):
Go to the Pending Changes panel
Select View Options under either Included or Excluded changes.
Switch between Show All and Show Solution Changes
Switch back if desired
Changing the View Option appears to force a refresh of modified files.

Resources