Visual Studio弹出窗口:“操作无法完成” [英] Visual Studio popup: "the operation could not be completed"

查看:415
本文介绍了Visual Studio弹出窗口:“操作无法完成”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打开一个项目时,在本地或 Team Foundation Server (TFS)上,我得到一个模态窗口,告诉我:


操作无法完成:未指定的错误


或相同的消息,但使用未定义类。而不是未指定错误。



这些错误是从今天早些时候开始发生的,当时我尝试将一些工作签入Team Foundation Server。我曾尝试在同一台计算机上使用Visual Studio 2008,但仍然收到相同的错误。我也用谷歌搜索了它,但是没有一个解决方案似乎对我有帮助。



我也安装了Windows Update的最新更新。



有什么想法吗?

解决方案

您是否尝试过删除 Your_Solution_FileName.suo 文件?



.suo 文件应与 .sln位于同一文件夹中文件,或位于 .vs 文件夹中以获取更新版本的Visual Studio。 .vs 文件夹可能被隐藏。






Visual Studio 2017更新

在VS 2017中, .suo 文件位于不同的文件夹中:您可以找到<$ c YourSolutionFolder\.vs\YourSolutionName\v15\.suo 中的$ c> .suo 文件/ p>

.vs 文件夹被隐藏,而 .suo 文件是不带名称的文件,仅带有 .suo 扩展名。








说明



.suo 文件包含各种信息,例如打开的文件列表,以及一些未保存在解决方案文件中的首选项(例如开始的项目)和



通常,您可以毫无问题地删除 .suo 文件。之后,您可能需要为解决方案设置 StartUp项目



为了保持安全,您就可以了。可以重命名 .suo 文件,然后重试启动解决方案,以查看是否有此帮助。



在我的经历有时VS在启动时崩溃是因为某些源代码中有错误,并且由于该错误,VS无法编译代码,然后崩溃,因为没有编译后的代码它就无法在设计模式下显示表单。
在这种情况下,删除 .suo 文件将解决此问题,因为它会重置打开的文件列表,因此该解决方案可以在不打开/不显示任何文件的情况下启动






删除.suo文件时不起作用

以下是删除 .suo 文件不能解决问题时可以尝试的其他操作列表:




  • 重新启动计算机

  • 清洁Windows临时文件夹

  • 从IDE中清洁解决方案(菜单\生成\清理解决方案)

  • 手动清理解决方案(删除 / bin / 文件夹中的已编译DLL / EXE并清空临时文件VS在构建过程中的 / obj / 文件夹中创建(组成解决方案的每个项目都有这些文件夹,因此请清理所有文件夹)

  • 尝试打开每个由解决方案一一组成的项目,并进行构建,以了解哪个是生成解决方案的特定项目。问题

  • 了解引发错误的更改/编辑/修改是什么,然后将其撤消(源代码控制工具可以帮助...)

  • 如果您具有自定义控件:检查构造函数中的代码。 VS IDE甚至会在设计时调用自定义控件的构造函数,并且可能会发生奇怪的事情(在设计时某些属性不起作用,您的连接字符串可能未填充...)



万不得已...




  • 尝试安装任何VS更新

  • 尝试禁用VS扩展(如果已安装...)

  • 尝试更新解决方案中引用的任何外部DLL /控件 li>
  • 尝试更新Windows


When I try to open a project, local or on a Team Foundation Server (TFS), I get a modal window telling me that:

The operation could not be completed: Unspecified error

Or the same message, but with "Class not defined.." instead of "Unspecified error".

These errors started happening earlier today when I tried to check in some of my work to the team foundation server. I have tried using Visual Studio 2008 on the same computer, but I still get the same error. I've also googled for it but none of the solutions seems to help me.

I have installed the latest updates from Windows Update as well.

Any ideas?

解决方案

Have you tried to delete the Your_Solution_FileName.suo file?

The .suo file should be in the same folder as your .sln file, or in the .vs folder for newer versions of Visual Studio. The .vs folder might be hidden.


Update for Visual Studio 2017
In VS 2017 the .suo files are located in a different folder: you can find the .suo file in YourSolutionFolder\.vs\YourSolutionName\v15\.suo

The .vs folder is hidden, and the .suo files is a file without name, with just the .suo extension.


 
Explanation

The .suo file contain various information like the opened files list, and some preferences that are not saved in the solution file (like the starting project) and other things.

Normally you can delete the .suo file without problems. You might have to set the StartUp Project for your solution afterwards.

Just to stay on the safe way, you can rename the .suo file, and then retry to start the solution, to see if this help.

In my experience sometime VS crash on start because there is an error in some source code, and due to that error VS can't compile the code, and then crash because without compiled code it's unable to show form in design mode. In this case, deleting the .suo file will solve the situation because it reset the open files list, so the solution can start up without opening/showing any files.


When deleting the .suo file doesn't works
Here's a list of other things you can try when deleting the .suo file doesn't resolve the issue:

  • Restart the computer
  • Clean Windows temp folder
  • Clean the solution from the IDE (Menu\Build\Clean Solution)
  • Clean the solution manually (delete the compiled DLL/EXE in the /bin/ folder and empty the temporary files that VS create during the build process in the /obj/ folder (each project that compose the solution has these folders, so clean them all))
  • Try to open each single project that compose the solution 1-by-1 and build it, to understand which is the specific project that generate the issue
  • Understand what is the change/edit/modification that triggered the error, and undo it (source control tool can help...)
  • If you have custom controls: check the code in the constructor. The VS IDE will call the constructor of your custom controls even at design time, and weird things can happen (at design time some properties dont works, your connection string probably isn't populated...)

As a last resort...

  • Try to install any VS update
  • Try to disable VS extensions (if you installed any...)
  • Try to update any external DLL/Control referenced in your solution
  • Try to update Windows

这篇关于Visual Studio弹出窗口:“操作无法完成”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆