Visual Studio popup: “the operation could not be c

2019-01-10 02:50发布

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?

29条回答
Luminary・发光体
2楼-- · 2019-01-10 03:30

For Visual C++ projects, this can be caused by an improperly formatted vcsproj.filters file.

In my case, someone had performed a manual branch merge and didn't merge the filters file correctly. Visual Studio still loaded and built the file without any warnings, but would give the 'unspecified error' warning whenever trying to add or remove files from the project.

Scan your vcsproj.filters file for any duplicate entries or lines that look like this and remove them. Close and reopen the project.

<ClInclude Include="..\..\path\to\sourcefile.h" />

Visual Studio Enterprise 2017

查看更多
对你真心纯属浪费
3楼-- · 2019-01-10 03:32

VS 2015 -> Deleting all the files in the ComponentModelCache worked for me:

C:\Users\**username**\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

查看更多
▲ chillily
4楼-- · 2019-01-10 03:32

If you are using Visual studio 2015 and working on ASP.NET, create a new website, copy the previous files into the new site and build your site. Your old project is still referencing some old startup parameters.

查看更多
够拽才男人
5楼-- · 2019-01-10 03:32

Worked for me after I closed Visual Studio (2015 Community Edition), opened it and opened project again.Had Happened to me because I was using this project as a dependency in another project and it was opened in another instance but the changes were not imitated.

查看更多
Evening l夕情丶
6楼-- · 2019-01-10 03:34

I had to remove a webproject. There was an old referencing DLL file inside, and I had to clean that webproject, and then it worked.

查看更多
登录 后发表回答