Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2013 - Operation Could Not Be Completed

After installing Visual Studio 2013 and playing around with some of the new features, I noticed I'm unable to open a cshtml file in one of my MVC projects. If I try opening it in the default html editor, I'm receiving the following error

The operation could not be completed

Opening the file in another editor, IE: HTML (Webforms) Editor, opens the file without any issue. So it seems to be an issue with the default Html Editor.

I've followed various suggestions for how to combat this problem from previous versions of VS. If I delete all the solution's ".suo" files, and restart Visual Studio, the error changes to:

Object reference not set to an instance of an object

Once Visual Studio creates a new ".suo" file, the error message reverts back to the previous one.

I've tried doing a repair install on VS2013, however I'm still running into the same issues. Also, running VS in Safe-Mode did not work either. I tried creating a new MVC project, which failed during creation. With any of these errors, the windows event log does not contain any messages.

Has anyone else had this problem?

like image 356
Brosto Avatar asked Oct 22 '13 16:10

Brosto


1 Answers

Just found your question here because it happened to me as well. Here's what I did and hopefully it will fix / help find the problem.

  1. Deleted all .suo
  2. Terminate IIS Express
  3. Close VS2013 and re-open
  4. Open your project and try to start it (F5)
  5. You probably have an error on your web.config file. For me it was an <appSettings> being there twice.
  6. Fixed the web.config file, save and boom, error is gone.

Hope it will also fix your situation.

like image 73
Dominic St-Pierre Avatar answered Oct 13 '22 02:10

Dominic St-Pierre