简体   繁体   English

Visual Studio扩展:挂接移动文件

[英]Visual Studio extension: hook on move file

I'm sure everyone who has been working with TFS at some point was annoyed by the fact that you will lose file history when moving files in between projects using the solution explorer (files will be deleted and added, not moved). 我确信在某个时候使用TFS的每个人都会对以下事实感到恼火:使用解决方案资源管理器在项目之间移动文件时,您将丢失文件历史记录(文件将被删除和添加,而不是被移动)。

So I was searching quite a lot what kind of solutions there are. 因此,我正在寻找很多解决方案。 The "best" solution was to do it in SourceControlExplorer. “最佳”解决方案是在SourceControlExplorer中进行。

I still find this very annoying, so I was thinking about writing an extension which hooks on the moving on a file within the solution explorer and perform the respective TFS move action. 我仍然觉得这很烦人,所以我在考虑编写一个扩展,该扩展与解决方案资源管理器中文件的移动挂钩并执行相应的TFS移动动作。 I have never seen an extension doing something similar like that and also could not find some. 我从未见过扩展做类似的事情,也找不到。

Can someone with some extension programming experience if this is something an extension is capable of? 具有某种扩展能力的人可以拥有一些扩展编程经验吗? Can I intercept default behavior and execute my own? 我可以拦截默认行为并执行自己的行为吗?

Hope this is not an of topic question!? 希望这不是主题问题!?

I think you need to develop an app for the TFS. 我认为您需要为TFS开发一个应用程序。 There are differen use cases for developing application around the TFS. 在TFS周围开发应用程序有不同的用例。 This sounds like a use case for the server. 这听起来像是服务器的用例。 Your application extends the file management system on the server. 您的应用程序扩展了服务器上的文件管理系统。

if you meant something completely different i'm sorry. 如果您的意思完全不同,对不起。

if you really want to do it in Visual Studio, you can develop an extension that extends the SourceControlExplorer. 如果您真的想在Visual Studio中执行此操作,则可以开发扩展SourceControlExplorer的扩展。 It is possible to get the complete history of a file and to modify the history itself. 可以获取文件的完整历史记录并修改历史记录本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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