Get CodeLens indicators for work done prior to upgrade to TFS 2013 - codelens

We have recently upgraded from TFS 2012 to 2013. One of the new features in Visual Studio 2013 is the CodeLens or Code Indicators which can pull associated work item, changeset and test impact data from TFS for many members in code (classes, properties, methods, etc).
It is my understanding that it gets these references through and indexing task on the server. Having upgraded, I had wanted to see previous work reflected in the indicators, but alas all I had where the reference indicators.

The CodeLense information is impacted by the indexing settings on the server. If your code is not indexed, it will not populate the CodeLens indicators.
On your server, open a command line in admin mode.
Navigate to C:\Program Files\Microsoft Team Foundation Server 12.0\Tools
We'll be using the tfsconfig command line tool. For this I will be assuming your collection is named DefaultCollection.
tfsconfig CodeIndex /setIndexing:on /CollectionName:DefaultCollection
tfsconfig CodeIndex /reindexAll /CollectionName:DefaultCollection
If you would like, you can check the indexing status with the following:
tfsconfig CodeIndex /indexingStatus /CollectionName:DefaultCollection
Information on these and more commands can be found here.

Related

visual studio express 2012 version control

I have been sent a working project from a coworker to start learning Visual Studio. The project is under version control, however I don't want to have access to final customer product. So when I try to open the solution file I first get a message that the project is under source control:
"Team Foundation Server Version Control
The solution you are opening is bound to source control on the following Team foundation Serer:
http:// . Would you like to contact this server to try to enable source control integration?"
[yes] [no] [help]
I press no, then I get an error:
"The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover the missing information automatically, the projects whose bindings are missing will be treated as not under source control."
[ok] [help]
I proceed and press ok, and another message pops up:
"projectname\projectname.tsproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=B1E792BE-AA5F-4E3C-8C82-674BF9C0715B"
My coworker tells me he sent the whole project, so I can't figure out why I cant get visual studio to open it. I am new to visual studio, but I have some programming experience.
Any help is much appreciated.
Thank you
It is doubtful that version control has something to do with your problem. There are two possibilities I could think of:
Your coworker uses full version of VS2012 and you are now having problems due to the fact that Visual Studio Express comes in two main flavours - Web and Desktop. It is unable to load Web(or Desktop) project because it just does not have any tools to work with it. Ask your coworker whether they mix web and desktop in their solutions. If it is so you should either use full VS or be given a reduced set of projects.
Nearly the same - your coworker uses some very old or very new version of particular project type (something like ASP.NET MVC that(as I remember) has different project type for each version). Again ask your coworker if it is so. In this case you will just have to install the needed templates and SDKs.
P.S. I was unable to open your link - it opens microsoft.com/default(maybe due to some regional problems). Search by key words brought to me similar problem for VS2010 http://connect.microsoft.com/VisualStudio/feedback/details/728847/could-not-open-vs2010-solution-with-mvc-project - may be it could help you more specifically.

“TF14045: The identity <guid> is not a Recognized identity” with TFS 2012 update 4 after upgrade from 2010

We recently migrated from TFS 2005 to TFS 2010 to TFS 2012 (Update 4)
TFS 2005 to TFS 2010 was done through a upgrade process. TFS 2010 to TFS 2012 was done through a detach (from TFS2010 box) and re-attach method (on TFS 2012 box)
One of our users is getting the following error.
“TF14045: The identity is not a Recognized identity”
The problem seems to be related to his machine name & workspace.
When I try to search TFS workspaces by computer name using Team Foundation Sidekicks 2012, I get the same error.
If the person works from a different pc, he doesn't have any issue.
Here is some stuff that I've tried
I tried deleting his profile and that didn't work.
Tried installing vs2013 to see if it's a Visual studio 2010 issue and that didn't work
Reinstalled the pc but with the same name and I'm still getting the error.
Tried to change the pc name, take it out of the domain, re-connect to the domain but that didn't work
I haven't tried to rebuild the machine again but with a different name to see what happens. I just want to see if anyone has any suggestions before I redo that long task.
In the end, I rebuilt the pc with a brand new name. After that the user had no more issues logging in.
I still get the error when I search TFS by machine name in Team Foundation Sidekicks but I think an answer to that is a lost cause.
**
update - After 2 years, I decided to go clean up old workspaces in TFS.
I noticed that still having the reported issue when trying view all my workspaces on a specific collection.
(tf workspaces /owner:* /computer:* /collection:....)
I opened up an incident ticket with Microsoft.
The answer, after a bit of troubleshooting, was to clear out the bad from the collection table - tbl_VCIdentityMap
Once we cleared out the first entry, i would retry the tf workspaces command and a new guid error would pop up.
I ended up clearing 25 entries from that table and then the issue with tf workspaces went away.
The guid that would pop up in the error message equals the TeamFoundationServerId located in many of the collection tables.
Here's a PowerShell wrapper that I used to delete all workspaces for a given user:
Set-Alias -Name 'tf' -Value 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe' # amend path so it points to your tf.exe file
# fetch a list of all workspaces and store them in an xml variable
$x = [xml](tf workspaces /computer:* /owner:* /format:xml)
# determine who we want to delete (this is used in our filter later; to delete all, just skip the filter
$userToDelete = 'Someone#example.com'
# for each workspace
# take those where the owner's display name matches our target user
# then delete that workspace (I've left prompts enabled, so you can manually validate things; add /noprompt to avoid that
$x.Workspaces.Workspace | ?{$_.ownerdisp -eq $userToDelete} | %{tf vc workspace /delete "$($_.name);$($_.owner)"}
More info on available options in the MS Docs; so you can tweak the above per your exact requirements.
Thanks to this post for showing me the XML output trick.
In our scenario, we were in the middle of a TFS to Azure DevOps Server migration.
Received the same error when connecting Visual Studio 2019 back to to TFS repos after being connected to new Azure DevOps instance.
Deleting the workspaces manually via Source Control Explorer did the trick.
I've done OK: I rename/remove Workspace that connect error from TFS_Database.dbo.tbl_Workspace

TFS 2012-based reports and settings open in separate browser window instead of tab in VS 2012 IDE

In the process of switching my folks over to TFS 2012, I was evaluating the team project reports I moved over. When I double-clicked on a report to open it, instead of seeing it in a tab within my VS 2012 IDE, it opens in a separate web browser window.
This behavior exhibits in migrated team projects (from 2010 to 2012), as well as newly created team projects. I'm inclined to think it's a configuration issue missed on my part, but I can't seem to nail it down.
[Migration details: upgrade performed by detaching 2010 collection, reattaching to running instance of TFS2012 on new hardware. ReportServer database was moved separately. Hardware is all WinSrv2008R2, SQL2012 Standard.]
UPDATE: altered title as this is happening to any/all settings and controls, as well, for any given team project (Security, Group Membership, Work Item Areas, etc). Anything that is URL-based. So, at least it's misbehaving consistently.
If I'm understanding you correctly, this is the expected behavior for TFS 2012. All of the controls you mentioned are part of Web Access and should be viewed/altered in a browser and not VS.

How to Troubleshoot Visual Studio 2012 Hangs/Lockups

I am doing PHP development in Visual Studio, and my solution contains projects for PHP, SSRS, and SQL Server (SSDT). And I am using TFS for version control. So there's a lot going on in my dev environment that can "go wrong".
I am experiencing intermittent hangs, usually around 5 minutes a clip. Visual Studio gives me the wait cursor, and if I click anywhere in VS the window dims. And then I just have to wait it out. Sometimes I can end the devenv.exe task, other times it takes several minutes to terminate the task. If I am feeling patient, I just wait and eventually (around 5 mins) VS comes back to life. I've never experienced loss of data, source control issues, etc, even when I terminate the process.
It happens sometimes when I save. Sometimes when I check-in. Sometimes when I check out. Sometimes when I build. I have been unable to discern any sort of pattern of the behavior.
All my workstation resources are fine- no RAM or i/o or network or CPU issues.
What can I do to troubleshoot this issue? Can I run VS in some sort of logging mode that would allow me to pinpoint what is taking so long during these periods of lockup?
To turn on logging in visual studio, run: devenv.exe /log
I personally would do this with a shortcut.
Consider deleting old TFS Workspace definitions left over from Continuous Integration Builds.
We had this same problem with a large Team Foundation Server project tree.
Sometimes, but not always, opening a Solution in Visual Studio 2010 or Visual Studio 2012 would hang exactly as described above. VS 2010 was most vulnerable; VS 2012 seemed less vulnerable, but it still would hang.
We were able to get some clues by monitoring the server activity on the TFS Server machine and the underlying SQL Server machine. A certain query stored procedure was using excessive CPU time in SQL Server. We tracked this stored procedure name to a TFS operation involved in scanning TFS Workspace definitions for other user's checkouts for files.
Our TFS environment has been in use for over 3 years, and we have been using Continuous Integration build definitions using a "zombie army" of developer workstations as TFS Build Agent hosts. We also create new TFS Branches for major releases. Each branch contains about 20 separate Visual Studio Solutions with their own build definitions.
Over time, we had accumulated about 2,000 TFS Workspace definitions on each developer workstation. We had about 10 workstations at one time with their own definitions.
Using the Visual Studio Command window and running as a TFS Administrator, we used this command to identify all workspaces created by our "build user":
tf workspaces /collection:tfservername\collectionname /owner:ourbuilduser >c:\tf_ws_del.bat
We then used global substitutes and the Notepad++ editor macro recorder to convert each result line into this form:
tf workspace /delete /collection:tfservername\collectionname workspacename;ourbuilduser <c:\yes.txt
where C:\yes.txt contained a single line of "y"
We also used some human judgement to remove deletion lines for workspaces named for our most recent TFS branch.
We then ran that c:\tfs_ws_del.bat script in the same Visual Studio Command window and waited patiently for it to finish.
End Result: Our Visual Studio solutions open very quickly. Even browsing the folder hierarchy in Source Control Explorer has sped up considerably.
WARNING: The deletion operations for a very large number of workspaces may expand the TempDB on the underlying SQL Server by a large amount. Coordinate with your DBA's to monitor space on the SQL Server machine. Stopping and restarting the TFS Collection via the graphical TFS Administrator Console tool helps reclaim some of that TempDB space and return it to its internal "free block" list.
This can also seem to happen when the symbol servers specified in your debug options are down or unreachable... it will not actually hang in this case but seem to as it times out for each file access.
To temporarily get around this problem uncheck the symbol servers that are down.

Adding Prerequisites using InstallShield 2010

I am very new to Installshield 2010. I have created a basic MSI setup for my application.
I need to check a few prerequisites for my application those are as below.
Microsoft frame work 3.5 with SP1.
Sql Express 2005.
Visual C++ redistributable
If any of the above things are not installed before means, I have to install while installing my application.
Can anyone guide me How I can install all these prerequisites before I installing my application?
Take a look at "Setup Prerequisites" and "Feature Prerequistes" They are the same except that the former are installed by setupe.exe before calling your MSI and the latter are installed by setup.exe (conditionally) after your feature selection and prior to the execution of the execute sequence in your msi.
If you go for the former, you probably also want to author AppSearch/System Search and Launch Conditions to block your MSI in case the user doesn't enter through the setup.exe.
InstallShield has predefined prereqs ( .PRQ's ) for each of those although I will caution you to atleast use SQL 2005 SP3 as there is a nasty bug in SP2 that can blue screen an XP machine. I'd actually really consider going with SQL 2008 R2.
Also found more info here in this page: http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/IHelpSetPrereqCustom.htm
This one took me quite a while to find, hopefully I'll save you some time.
If you just want to force your user to have some applications installed (e.g. 'Visual C++ redistributable') or some specific configuration (e.g. specific Windows version/ reg value etc.)
You can use 'Behavior and Logic -> System Search' add the search for what you need (file/folders/registry entries/ini files values/XML file values),
On "What do you want to do with the value?" dialog select Store the values in the property and use the property in an Install Condition".
This will cause the Search to be executed when your installation package starts and will display an error popup to the user saying what ever message you've entered for the condition.
Few notes:
- If you're looking for a x64bit registry entry - mark the "Search the 64-bit portion of the Registry" check box.
- Did not find a way to edit the Condition once created, when tried to edit it it just lets me see and change the search parameters, but for the condition it only allows to enter it from scratch; as a workaround you can save the project as XML file (Installation Information -> General Information -> Project File Format) and edit the XML externally.
Good luck.

Resources