问题
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?
回答1:
You can upgrade to the latest TFS, code search is available in TFS 2017, see Search your code for details.
However, in you case if you are using Git, you can us 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):
- Install Go and create your workspace directory,
%USERPROFILE%\go
as default. Run cmd,
C:\> cd %USERPROFILE%\go
Then run below command to install Hound:
go get github.com/etsy/hound/cmds/...
Create a
config.json
file in a directory whichhoundd.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" } } }
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...
Access http://localhost:6080 to search the code
来源:https://stackoverflow.com/questions/46283650/how-can-i-publish-source-code-visual-studio-on-a-intranet