Visual Studio offers a number of command line switches that allow you to run the IDE and perform a specified task. You can get a complete list and more information here Visual Studio Command Line Switches .
Here are a couple I’ve used.
This comes in handy when updating a web reference and get this error: “The components required to enumerate web references are not installed on this computer…” The error goes on to suggest re-installing visual studio. But, what this really means is at some point during start up a visual studio extension did threw and error and you said yes to not load it in the future. All you need to do is run the above command and you should be able to update your web reference.
Running this will create …\Application Data\Microsoft\VisualStudio\9.0\ActivityLog.xml. I haven’t used this personally, but the vendor of a third party tool I’m using asked for it to help troubleshoot an issue. I thought I’d pass it along.
We’re in the process of some long overdue upgrades to our development tools and first up on the list was TFS (2008 to 2010). This seemed like a simple process. As a team we’ve had experience installing TFS, build servers, and using VS2008 with TFS 2010. We did our prep work set a date and off we went (yesterday). We ran into a few of these:
But after a few hours we were up and running and all was good…
We decided to tackle our automated builds the next day (today) . That’s when we noticed the configuration tools for the build server had not been installed. No big deal, or at least it shouldn’t have been. When we installed the missing component(at the time on the same server) the application tier was removed by mistake…
Again we thought, no big deal, we’ll just re-install them. And it wasn’t, we re-installed them no problem. The problem occurred when we ran the “Application Tier” only configuration from the TFS Administration Console. We got the following error:
It appears that when we upgraded TFS to 2010 the service account was added as the database owner of the Tfs_Configuration database making it the dbo account. That all worked fine until we had to re-install the application tier. It would not recognize our service account as the dbo account and allow the connection. We tried running TFSConfig.exe Accounts /add /AccountType:ApplicationTier /Account:”Service Account” /password:”pwd” /sqlInstance:”name of server” /databasename:”Tfs_Configuration” to configure the account.
Still no luck.
Finally, we fixed the problem by changing the dbo account for the Tfs_Configuration database to another domain user. Then explicitly adding our service account to the database. Once we did that we re ran the TFSConfig accounts again and TFS is back up running.
It appears that this issue happens a lot when you’re trying to configure a new application tier over an existing TFS database. Hopefully, if you run into this your building out a TFS server farm not recovering form a stupid mistake or a disaster. It’s worth noting that when I was researching this issue I read conflicting information. Some say running TFSConfig.exe Accounts was enough while others had to play with database permissions as we did. In the end, we did both and it worked. It’s also worth mentioning, after we recovered from the issue we installed the build service on a separate server which is the recommended practice.