Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
658 views
in Technique[技术] by (71.8m points)

visual studio - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...