Visual Studio popup: "the operation could not be completed"
Solution 1
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
Solution 2
Sometimes it is just a matter of closing Visual Studio 2015 and then open again.
Update: Visual Studio 2017 apparently as well.
I have had this happen on a few machines.
This does happen.
"Have you tried to delete the "Your_Solution_FileName.suo" file?"
Also computer crashing like e.g. power outage etc...
Applies to Update 2 and Update 3 as well as fresh base without any updates...
Solution 3
VS 2015 -> Deleting all the files in the ComponentModelCache
worked for me:
C:\Users\**username**\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Solution 4
I ran into this same problem but deleting the .suo file did not help. The only way I could get the project to load was by deleting the "Your_Project_FileName.csproj.user" file.
--
I ran into this problem again a few months later but this time deleting the "Your_Project_FileName.csproj.user" file didn't help like it did last time. I finally managed to track it down to an IIS Express issue. I removed the site from my applicationhost.config and let Visual Studio recreate it, this allowed the project to finally be loaded.
Solution 5
For me, this issue was being caused by conflicting <site>
configurations in the following file.
C:\Users\smunro\Documents\IISExpress\config\applicationhost.config
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.
<configuration><system.applicationHost><sites>
Note that I left the <siteDefaults>
, <applicationDefaults>
and <virtualDirectoryDefaults>
elements there.
When I reloaded the project, a new <site>
element was created automatically.
Related videos on Youtube
nbon
Updated on July 16, 2022Comments
-
nbon almost 2 years
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?
-
BlackICE about 8 yearsIf you're hitting this, check the answers here as well: stackoverflow.com/questions/32180470/…
-
Don Cheadle almost 8 years75% of the time, restarting VS resolves this.
-
user5226582 over 5 years2019 and still an issue, now in VS2017. Embarrassing
-
Zhang about 5 yearsUnload and reload project works for me.
-
Andreas almost 4 yearstry restarting Visual studio as administrator.
-
-
Scott Munro over 9 yearsI removed all of the sites in the applicationhost.config and was then able to reload the project.
-
Max about 9 years@sergiol have you tried to disable any visual studio Addins you may have installed? Sometime they can crash the IDE
-
army almost 9 yearsThat's more like it. The weirdest thing was, it errored in VS2015 but went through fine in VS2010.. :S Oldie but goodie? :)
-
Erick Asto Oblitas almost 9 years@sergiol Try removing all .suo. I delete the .suo that exist at the top of the solution folder and didn't work. Then I search one in a hidden folder "\.vs\ci-ucsp\v14" and finally works.
-
sixones almost 9 yearsIn Visual Studio 2015, the solution was to delete the .user files that go along side the .xproj file.
-
Thomas Andreè Wang over 8 yearsThis is a horrible anoying bug (the one thats solved bu this) a way of detecting the issue without actual trying to check is that the output window is not displaying (no output window == restart VS to fix).
-
Tom Stickel over 8 yearsI still prefer vs 2013 for some things like Nuget and some various TFS online connections and various areas of stability. Overall vs 2015 is fantastic, but certainly not without some issues.
-
Tom Stickel over 8 yearsI had another issue with VS 2015 the other day in which I could not get the localhost page to load. Fiddler was making tons of calls to something that I hadn't seen before. Not sure why, but me and another developer tried all sorts of things before I decided to try closing VS 2015. Then it worked fine on re-opening it. A little annoying , but no turning back from vs 2015 at this point ( sp1 is installed too)
-
Chris Lunt over 8 yearsYou can also look at the Microsoft.VisualStudio.Default.err file in that directory to determine what might be causing the issue.
-
Kristian about 8 yearsYeah, I just had this problem when I switched git branches on the solution. Couldn't build, couldn't debug, nothing. Deleting the *.user file did it.
-
Tom Stickel about 8 yearsI had VS 2015 Update 2 on a computer and suddenly I could not create NEW web application ( console apps etc.. i could) I was spending too much time trying to figure out the problem, I ended up doing a Repair via kicking off the VS 2015 plus update 2 bundle ... very annoying as reboot and other things did not fix it. - Just another issue I had that I figured I would add to comments. ( I did install vs 15 preview on that computer so I wonder if that install caused the problem ) .
-
Richard.Davenport about 8 yearsIf you're using Visual Studio 2015, then delete the applicationhost.config file out of <Root-of-Solution>\.vs\config\, this worked for me, because I had messed with the bindings.
-
pocjoc about 8 yearsThis is a very extreme solution. Before you use this solution, try other solutions described in this thread. The first thing that sometimes Works (at least for me) is to close and re-open Visual Studio.
-
Boggin about 8 years@ChrisLunt That suggestion showed an Extension that was throwing errors. Removing just that solved it for me.
-
Mr. TA almost 8 yearsI had a similar issue. The SLN file had a web site (not a web project), which was referencing a project which was removed from the solution. In my case I just re-added the missing project and all is well.
-
Jorge Cabot over 7 yearsDeleting the .suo file inside the .vs folder did not work. Also, I did not have any .user file to delete.
-
Max over 7 years@Jorge Cabot Other things you can try, in no specific order: restart the computer / delete windows temp folder / clean the solution from the IDE / clean the solution manually (delete the compiled DLL and the temporary files that VS create during the build process) / Understand what have you done to trigger this error, and undo it / try to open the single project that compose the solution 1-by-1 and see if it's a specific one that give you problem / If you have custom controls: check the code in the constructor, the IDE will call it in design time
-
Jorge Cabot over 7 years@Max After installing an update to VS2015 and performing a restart the error is now gone. Thanks.
-
Rick over 7 yearsVisual Studio 2005?... I don't even see that option in recent versions of Visual Studio...
-
Sri Murthy Upadhyayula over 7 years@ArielAltamirano As I said, this option is present in Studio 2005, not sure about the recent versions
-
Aleksei Petrenko over 7 yearsDidn't work for me, deleting this files has absolutely no effect. Also, no additional lines appear in
.err
file when I see the issue. -
Ludvig Rydahl over 7 yearsMy comp crashed due to a power outage, and when trying build/rebuild/clean after booting back up again I got this error. By manually removing the EXE and cleaning out the obj-directories fixed it for me. Thanks a lot!
-
Cos Callis over 7 yearsThis seems to be KEY to a working solution! I certainly didn't intentionally close the Output window and didn't even think to look and see if "Output" was there. Whatever the underlying issue may be the missing output window was part of the problem. NOTE: in my case View-> Output (ctrl+alt+O) was not enough to cause the window to appear, I had to THEN restart Visual Studio 2015.
-
HiredMind over 7 yearsYes. If you try to do Ctrl-Alt-O or View->Output after doing any operation that tries to write to the output window (e.g. a build), it's too late - you'll have to restart.
-
arni over 7 yearsRepairing Visual Studio solved the problem for me. I had this issue with VS2008 (yes, 2008!) after installing VS2017 (but this could be unrelated).
-
sergiol about 7 yearsWas happening to me only on the Release configuration. Deleting *.suo did not solve, but closing VS, delete *.suo and starting VS again did the job.
-
dyslexicanaboko almost 7 yearsThis happened to me specifically with VS2015 while I was working on an SSIS package. I just restarted VS2015 and it solved my problem.
-
metal almost 7 yearsHappened to me in a CMake-generated project for VS 2017 (version 15.3.5). All of my projects built in Debug, but in Release, some built while others did not, giving the terse "unspecified error". I deleted
build\.vs\.suo
and then it built in Release. -
Leon Degeling about 6 yearsI arrived here seeing similar problems, no answers here worked. I just found my problem was caused by the fact that my solution is on my onedrive, Onedrive was updated and has a new feature called files on demand. This feature causes similar problems as described here. More details can be found here. developercommunity.visualstudio.com/content/problem/134518/…
-
Tom Stickel over 5 yearsYes, that is what I said in 2015 . stackoverflow.com/questions/9079466/…
-
sapatelbaps over 5 yearsThnx. It worked perfectly for me. Deleting .suo file and all other sort of things are not working. This is the perfect solution.
-
bmiller about 3 yearsI had a WIndows crash and VS (2019) managed to write null's out to my .user files -- and a few csproj files as well. Deleting the .user (and reverting the .csproj) files fixed it.