Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio popup: "the operation could not be completed"

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

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...


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

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


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.


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.