TFS 2010 and VS 2010 searching code in source cont

2019-04-03 03:50发布

This question is similar to: Find in Files: Search all code in Team Foundation Server However it was asked 4 years ago. I'm asking specifically about TFS 2010 with VS 2010.

Has Microsoft finally got around to adding back the searching of files for code snippets like they had way back in Visual Source Safe? If so, how to enable it and use it?

I've tried adding in Microsoft's Power Tools. While it has a search feature, the search is only for file names and ignores looking in the content in the files. :(

7条回答
爷的心禁止访问
2楼-- · 2019-04-03 04:26

I check out the entire library (Latest Revision) and run this Powershell script:

C:\Users\username>powershell
Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Users\username> cd C:\LocalDevelopment
PS C:\LocalDevelopment> get-childitem -include *.* -rec | select-string -pattern "a string" > a_string.txt

which is: Do a recursive search on all files in c:\LocalDevelopment for "a string" (add your string there, of course) and output the results to a text file.

查看更多
登录 后发表回答