When I try to open two projects in two different instances of Visual Studio and run both of them locally in debug mode at the same time (say, a web application and the backend WebService that it uses) I get the error "Unable to start debugging on the web server. A debugger is already attached"
No one else in the office is able to do it either, except for one person, who can't figure out why it only works for him. The virtual directories in my computer's IIS seem to be set up the same way as his (I don't know about the settings).
I was also able to debug from two instances of VS at once at my previous job, so something about the setup here must be different.
I figured it out. Each project needs to be set to a different Application Pool. Found the answer here.
Since the same AppPool was being used by both the Web Application and Web Service, the same process hosted both. That is why as I had already attached the process in one instance of Visual Studio, I could not attach it in the second instance of Visual Studio.
Changing the AppPool had the effect of both being hosted in different host processes and hence they could now be debugged using different instances of Visual Studio.
Simple Question,
I have few Team Foundation Servers I'm working with.
I want to be able to easily switch between them
(a solution based approach - each solution will be managed at it's own TFS).
Is there an easy way to achieve this or do I have to reconfigure VS2013 each time from scratch ?
It looks like it is possible from
Home->another click on HOME-> Project and My Teams->connect to Team Projects-> Press on Servers button and you can Add another TFS server.
When I launch a project on Visual Studio 2010, I have to wait 10 minutes while the "Updating Source Control Status" finishes at the bottom of the screen. Until this happens, Visual Studio is completely frozen.
I am connected via VPN, and I have enabled domain lookup for my tfs host. (http://www.codeproject.com/Questions/111260/VS-NET-2008-hangs-everytime-we-load-our-project-fr.aspx?tab=mostrecent)
I am not sure what else to do. Any ideas?
the simplest way to investigate is to enable tracing in devenv.exe (look at tf.exe.config and copy appropriate part to devenv.exe.config) and see what server calls are being made. I would recommend publishing results on msdn forum (http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol) since TFS devs are monitoring it much closely than stackoverflow.
Good luck!
If you use yourtfsserver.visualstudio.com and the site is down (for instance like it is right now due to an Azure storage disruption) VS may freeze up on you when you open a new source controlled project or randomly while your in a project even it it isn't in source control.
This is with VS and TFS 2010. I have multiple TFS servers and multiple collections. When I launch VS, it connects to the "last used" collection. If I had multiple instances of VS open, connected to different collections, whichever exits last appears to "win" as the last used collection. This is annoying.
Really what I want is multiple desktop shortcuts, each set up to force Team Explorer to connect to a specific collection at start-up.
Is this possible?
I don't have the precise solution you asked for, but I feel your pain and this is what I use.
Download and install the Team Foundation Power Tools.
From a Visual Studio Command Prompt run the following command:
tfpt connections
Uncheck the 'Automatically reconnect to last server on startup' checkbox, and close the tool.
Then create a shortcut on your desktop as follows:
devenv /Command Team.ConnecttoTeamFoundationServer
This will open the 'Connect to Team Foundation Server' dialog on startup, where you can then select a server/collection/project from the dialog. It saves the 'wait for connect', 'disconnect', 'choose server' dance.
In newer versions of Visual Studio there is this option which will automatically hide or show Team Explorer on Startup:
Help -> Manage Visual Studio Performance -> Tool Windows -> Start Up
Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!
Is it possible to switch TFS into an offline mode in the event of such an issue?
See this reference for information on how to bind/unbind your solution or project from source control. NOTE: this doesn't apply if you are using GIT and may not apply to versions later than VS2008.
Quoting from the reference:
To disconnect a solution or project
from source control
In Visual Studio, open Solution
Explorer and select the item(s) to
disconnect.
On the File menu, click Source
Control, then Change Source Control.
In the Change Source Control dialog
box, click Disconnect.
Click OK.
The 'Go Offline' extension adds a button to the Source Control menu.
https://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138
plundberg: The "disconnect" button is only available for the TFS provider starting in VS 2008. Even then, I'm not sure if it's officially supported. The recommended way to use the Go Offline feature is to [re]open the solution.
Martin Pritchard: if you get stuck mid-operation, you can force VS to timeout by pulling the network plug (literally) or running ipconfig /release.
Once you're marked offline, here's a step by step guide to working in that mode: http://teamfoundation.blogspot.com/2007/12/offline-and-back-again-in-vs2008.html
More detailed info on tweaking the behind-the-scenes behavior:
http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx
http://blogs.msdn.com/benryan/archive/2007/12/12/how-to-make-tfs-offline-strictly-solution-based.aspx
There are couple of little visual studio extensions for this purpose:
For VS2010 & TFS 2010, try this
For VS2012 & TFS 2010, use this
In case of TFS 2012, looks like there is no need for 'Go offline' extensions. I read something about a new feature called local workspace for the similar purpose.
Alternatively I had good success with Git-TF. All the goodness of git and when you are ready, you can push it to TFS.
Depending on which tool windows you have open, VS may or may not try to hit the team server automatically when it starts up.
For best results try this:
Close all instances of visual studio
Open an empty visual studio (no project/solution)
See which windows are opened by default, if source control explorer or team explorer or any other windows that use team are opened (and activated) by default, close them or switch them to a background tab.
Close visual studio
You should notice now that you can start visual studio without it trying to hit the TFS server.
I know its just an aside to your problem, but I hope you find this helpful!
If you have a solution open, and TFS is down, you might have trouble going into offline mode. If you close and reopen your solution, a nice little dialog will appear asking you if you want to Go Offline.
Alternatively if you don't want to close/reopen the solution, (as suggested by Bernie) you can install the TFS Go-Offline plugin, then click:
TEAM -> Go Offline
Simply, change the root folder name for your solution in your local machine, it will disconnect automatically.
I just wanted to include a link to a resolution to an issue I was having with VS2008 and TFS08.
I accidently opened my solution without being connected to my network and was not able to get it "back the way it was" and had to rebind every time I openned.
I found the solution here;
http://www.fkollmann.de/v2/post/Visual-Studio-2008-refuses-to-bind-to-TFS-or-to-open-solution-source-controlled.aspx
Basically, you need to open the "Connect to Team Foundation Server" and then "Servers..." once there, Delete/Remove your server and re-add it. This fixed my issue.
If the code has already been checked out by the user that if offline and they have the latest version on their local hd, then they just need to browse to the solution location and open the solution by double clicking sln file. The solution will open in disconnected mode.