简体   繁体   English

无法重命名Visual Studio 2010项目

[英]Can't rename Visual Studio 2010 Project

I have a Visual Studio 2010 Solution, that is also under source control (TFS 2010). 我有一个Visual Studio 2010解决方案,该解决方案也受源代码控制(TFS 2010)。 Usually, I have no problem renaming a sub-project; 通常,重命名子项目没有问题。 just right-click, rename, and life is good! 只需右键单击,重命名,生活就会美好!

However, I now have one project that I'm trying to rename, but whenever i right-click, type in a new name, and then hit enter, it goes right back to the old name! 但是,我现在有一个要重命名的项目,但是每当我单击鼠标右键,键入一个新名称,然后按Enter键,它就会回到原来的名称!

I must be losing my mind here! 我一定在这里迷失了方向!

You probably already have a file with the name you are trying to use on the filesystem though not as part of the solution/project. 尽管可能不是解决方案/项目的一部分,但您可能已经拥有一个名称正试图在文件系统上使用的文件。

Use the windows explorer to find and delete this file and you should be good to go. 使用Windows资源管理器查找和删除此文件,您应该一切顺利。

In the end it seemed like a TFS issue. 最后,这似乎是一个TFS问题。 THere was a lingering shelveset that was mapped to the project that wouldn't allow me to modify it at all. 这是一个挥之不去的货架,已映射到该项目,根本不允许我对其进行修改。 Once I was able to get my TFS admin to make the necessary changes, all was well! 一旦我能够让我的TFS管理员进行必要的更改,一切都很好!

I tried to go offline from TFS but it gave no results =( 我试图从TFS脱机,但未得到任何结果=(

So, then I tried to delete 'SolutionName.suo' file and it made the trick! 所以,然后我试图删除'SolutionName.suo'文件,这成功了! I was able to rename my project. 我能够重命名我的项目。 Buggy VS 2010 =( 越野车VS 2010 =(

Just try to do Reset Settings 只需尝试进行重置设置

The command "devenv /resetsettings" will restore Visual Studio back to its original factory state. 命令“ devenv / resetsettings”将把Visual Studio恢复到其原始出厂状态。 If you have previously saved your settings from option 1 above, you can pass them as a parameter: "devenv /resetsettings ". 如果您先前已经通过上述选项1保存了设置,则可以将它们作为参数传递:“ devenv / resetsettings”。

Or else if you have saved any previous settings try to import by this path "Tools" > "Import and Export Settings…" and your problem get resolved. 否则,如果您保存了以前的任何设置,请尝试通过此路径"Tools" > "Import and Export Settings…"问题将得到解决。

If this is v1 sorry you can't rename it as it is mentioned here http://social.msdn.microsoft.com/forums/en-US/tfsgeneral/thread/9e50138e-46f2-4f7f-ba09-e5624d30250b/ 如果是v1版本,对不起,您不能重命名,因为此处提到了它http://social.msdn.microsoft.com/forums/en-US/tfsgeneral/thread/9e50138e-46f2-4f7f-ba09-e5624d30250b/

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

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