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?
I removed an old project from the solution, after that the error occurred. I had to open the .sln file in notepad and delete the .dll reference tot he old project that I removed. After that it worked.
I had a similar problem on opening Razor Views
I think StyleCop is the reason of the this issue. So,
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 inYourSolutionFolder\.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 theStartUp 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:/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))As a last resort...
For me, this issue was being caused by conflicting
<site>
configurations in the following file.I edited this file to remove all of the
site
elements within the following element. You might want to be a little more selective and try to identify the site that is causing the conflict and remove just that.Note that I left the
<siteDefaults>
,<applicationDefaults>
and<virtualDirectoryDefaults>
elements there.When I reloaded the project, a new
<site>
element was created automatically.While working on VB.Net projects in Visual Studio 2005, I have faced this issue many times. Usually, disabling the 'Enable the Visual Studio hosting process' option in the application's debug properties solves the issue for me. Usually, when the hosting process is enabled, calls to certain APIs can be affected.
To un-check this option, you need to follow the steps below: