简体   繁体   English

如何在TFS 2010中编辑.sln文件?

[英]How to edit .sln file in TFS 2010?

I need to delete several lines from the solution file (.sln). 我需要从解决方案文件(.sln)中删除几行。 When changing .csproj files I can use "Unload project". 更改.csproj文件时,我可以使用“卸载项目”。 But what is the proper way to edit .sln file in TFS? 但是在TFS中编辑.sln文件的正确方法是什么?

最好的选择是关闭解决方案,然后使用文本编辑器(记事本或等效工具)。

You can use the TFS Powertools for that purpose. 您可以将TFS Powertools用于此目的。 It enables you to make tfs-"operations" from the windows explorer (and edit the .sln file with an txteditor). 它使您可以从Windows资源管理器中进行tfs-“操作”(并使用txteditor编辑.sln文件)。

Another option is to copy the sln in Visual Studio as a temporary text file, and edit there. 另一个选择是将sln作为临时文本文件复制到Visual Studio中,然后在其中进行编辑。 I used this to handle some changes like regex updates to the sln file, without having to use the VS UI to adjust tons of build processor changes (and without having to do it using a public online web tool). 我用它来处理一些更改,例如对sln文件进行正则表达式更新,而不必使用VS UI来调整大量的构建处理器更改(而不必使用公共的在线Web工具进行更改)。 Once the text was updated, paste the new text back into the original sln file and save, using a tool like notepad, etc. VS will then tell you it needs to reload the new sln, and the changes will be loaded. 文本更新后,将新文本粘贴回原始sln文件中,并使用记事本等工具保存。然后VS会告诉您需要重新加载新的sln,并且更改将被加载。

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

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