本文介绍了如何在Intranet上发布源代码(Visual Studio)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010中使用TFS2008管理各种解决方案,我想在Intranet或本地"网站上发布它们的代码,以帮助无法访问TFS的开发人员查看和搜索代码.我知道TFS有一个Web界面(Visual Studio Team System Web访问)可以查看代码,但是它非常慢并且没有搜索选项.

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.

是否还有其他更特定的工具可以在网站上发布和搜索VisualStudio Project/Solution的代码?

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

推荐答案

您可以升级到最新的TFS,TFS 2017中提供了代码搜索,请参见搜索您的代码以获取详细信息.

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

但是,如果您使用的是Git,则可以使用代码搜索工具 Hound :闪电般的快速代码搜索工具.

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

如果您的团队拥有许多和/或大型代码存储库,并且可以从中受益 通过统一的快速搜索工具,猎犬值得一看.

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

您可以直接将Git repoLocal Folder指定为要搜索的数据源.

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

要使用该工具(使用Go Tools),

To use the tool (Using Go Tools):

  1. 安装转到,并创建工作空间目录,默认为%USERPROFILE%\go.
  2. 运行cmd,C:\> cd %USERPROFILE%\go

  1. Install Go and create your workspace directory, %USERPROFILE%\go as default.
  2. Run cmd, C:\> cd %USERPROFILE%\go

然后运行以下命令来安装Hound:

Then run below command to install Hound:

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

在其中存在houndd.exe的目录(此处为%USERPROFILE%\go\bin下)中创建一个config.json文件,并添加您的存储库列表.例如:

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" } }}

{ "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" } }}

使用houndd运行Hound服务器,您应该会看到类似的输出到:

Run the Hound server with houndd and you should see output similarto:

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

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

访问 http://localhost:6080 搜索代码

这篇关于如何在Intranet上发布源代码(Visual Studio)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 16:45