简体   繁体   中英

How can I publish source code (Visual Studio) on a intranet?

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?

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 aGo 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

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM