-1

I have various solutions in VS2010 managed with TFS2008 and I want to publish code of them on a intranet or "local" website to help developers with no access to TFS to view and search code. I know that TFS has a web interface (Visual Studio Team System Web Access) to view the code, but it's very slow and has no search option.

Is there any other more specific tool to publish and search code of a VisualStudio Project/Solution on a website?

Marc
  • 1,359
  • 1
  • 15
  • 39
  • 1
    cloud? bitbucket or github perhaps...both easily searchable. you are not precluded to also adding any solution/project to git or mercurial and publishing it. you could even make your master repo live on a file share if you didnt want to go cloud. but whats the fun in that? – jenson-button-event Sep 18 '17 at 16:00
  • [Visual Studio Team Services](https://www.visualstudio.com/team-services/) – Alexan Sep 18 '17 at 16:16
  • 1
    Your first step should be to upgrade to a version of TFS released in recent memory. TFS 2008 is extremely limited in capabilities compared to TFS 2017. TFS 2008 is unsupported and runs on software configurations that are likewise unsupported. Staying on a platform that outdated is asking for problems. I think you'll find that modern versions of TFS have the capabilities you're after built in. – Daniel Mann Sep 18 '17 at 22:56
  • @DanielMann: We've got a plan to upgrade TFS but we've a bit complex architecture (branches) and it's difficult to migrate, we've done a lot of tests and we lose info (merging baseline), anyways in the medium term we must upgrade, but in the meantime we need a "very simple" tool to search on the code in a web. Thanks. – Marc Sep 19 '17 at 06:22
  • @Alexan, same as last comment to DanielMann, thanks. – Marc Sep 19 '17 at 06:23
  • @jenson-button-event, yes this is my preferred option, I'd thought about it, a local github repository but I was searching an "easier" specific tool, if I don't find any, I'll implement it. Thanks. – Marc Sep 19 '17 at 06:25
  • @Marc TFS 2008 can be upgraded to TFS 2017 with no loss of data. You don't need to migrate source code. TFS 2008 can be upgraded to TFS 2012, then TFS 2012 can be upgraded to TFS 2017. It's not that bad. – Daniel Mann Sep 19 '17 at 19:06
  • @DanielMann, our team has done various tests to migrate (direct or throught GIT intermedial repository), and they had a lot of problems and they were unable to upgrade with no loss of data at the moment, we've planned to move on early next year and we'll take care to solve it. – Marc Sep 20 '17 at 06:07

1 Answers1

1

You can upgrade to the latest TFS, code search is available in TFS 2017, see Search your code for details.

However, in your case if you are using Git, you can use the code search tool Hound: a lightning fast code search tool.

The search is based on Russ Cox's Regular Expression Matching with a Trigram Index algorithm, which is served up by a Go back-end to a React front-end.

If your team has many and/or large code repositories and could benefit from a unified, fast search tool, Hound is worth a look.

You can directly specify the Git repo and Local Folder as the data source to be searched.

To use the tool (Using Go Tools):

  1. Install Go and create your workspace directory, %USERPROFILE%\go as default.

  2. Run cmd, C:\> cd %USERPROFILE%\go

  3. Then run below command to install Hound:

go get github.com/etsy/hound/cmds/...

  1. Create a config.json file in a directory which houndd.exe exist there (under %USERPROFILE%\go\bin here) with your list of repositories added. eg:

    { "dbpath" : "data", "repos" : { "SomeGitRepo" : { "url" : "http://server:8080/tfs/CollectionLC/_git/Git-Scrum" }, "AnotherGitRepo" : { "url" : "http://server:8080/tfs/CollectionLC/_git/Git-GlobalSettings", "ms-between-poll": 10000, "exclude-dot-files": true }, "LocalFolder" : { "url" : "file:///C:/Users/andy/LocalRepo" } } }

  2. Run the Hound server with houndd and you should see output similar to:

2017/09/19 17:21:50 Searcher started for AnotherGitRepo 2017/09/19 17:21:54 Searcher started for LocalFolder 2017/09/19 17:21:55 Searcher started for SomeGitRepo 2017/09/19 17:22:07 merge 0 files + mem 2017/09/19 17:22:07 14299049 data bytes, 1781057 index bytes 2017/09/19 17:22:07 All indexes built! 2017/09/19 17:22:07 running server at http://localhost:6080...

  1. Access http://localhost:6080 to search the code

enter image description here

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • Thanks for response, it's a very good response, but I'll wait a bit for a more specific tool, but I'll mark it as answer. – Marc Sep 19 '17 at 13:23
  • If their source code is in TFS 2008, they obviously aren't using Git, so most of this answer is not applicable. – Daniel Mann Sep 19 '17 at 19:07
  • @DanielMann The answer is applicable for me (I've done the question), I've mentioned that I need a way to publish and search code, and that's a way. Are you downvoting question and answer? I don't understand why? – Marc Sep 20 '17 at 06:09
  • @Marc Transform to Git if necessary use [git-tfs](https://github.com/git-tfs/git-tfs) which is a two-way bridge between TFS (Team Foundation Server) and git. If the answer is applicable for you, you could [Accept it as an Answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work), This can be beneficial to other community members reading this thread. – Andy Li-MSFT Sep 21 '17 at 08:04