VS 2013 giving The operation could not be complete

2019-03-12 06:03发布

问题:

I installed VS 2015 version on my system. I already had Visual studio 2013 update 4 installed on my machine. But now, whenever I try to open any cshtml ( razor view) in VS 2013, I get following error:


Microsoft Visual Studio

The operation could not be completed. Invalid pointer

OK

Please suggest me its solution.

回答1:

For anyone arriving here after installing Visual Studio 2015 Update 1 and then updating some packages, here is what fixed it for me:

  1. Close Visual Studio
  2. Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  3. Re-open Visual Studio

I was getting this error message in VS2015 and the fix worked for me, so it seems to apply to 2013 and 2015.

I found the solution on another Stack Overflow question: Visual Studio 2015 Broken Razor Intellisense.



回答2:

Installing Visual Studio 2015 Update 1 fixed this for me:

  • https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx


回答3:

Sometimes it helps to delete Solution User Options (.Suo) File. In my case it was the evil and worked for me.



回答4:

I'm not sure what ended up fixing it, but I closed Visual Studio and opened up developer tools, and ran devenv /SafeMode which starts it with no extensions installed. I then navigated and opened up the solution in the instance and it worked. It complained about source control bindings and removed those (This solution used to be in a TFS project and now it's in a git tfs project). Then after saving it and closing visual studio I was able to re-open the solution from file explorer.

I'm not sure if it was the devenv or the source control bindings that fixed it, or just restarting visual studio for the umpteenth time, but it appears to work now.



回答5:

I have the same error and I have tried the following with NO SUCCES

  • “%ProgramFiles%\Common Files\Microsoft Shared\VS7DEBUG” to something else. I changed it to VS7DEBUG1.
  • Delete the content of %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  • Installed Servicing Update (KB3110221) - https://blogs.msdn.microsoft.com/visualstudioalm/2016/01/26/servicing-update-available-for-visual-studio-update-1/
  • C:\Program Files (x86)\Microsoft Visual Studio14.0\Common7\IDE\devenv.exe /resetuserdata
  • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /resetsettings

I finally uninstalled visual studio 2015. Restarted and installed it again and then it worked.



回答6:

Sometimes it is just a matter of closing Visual Studio 2015 and then open again.

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



回答7:

I managed to get rid of this error by a combination of the answers here plus some more:

  1. Close Visual Studio
  2. Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  3. Delete the .suo file
  4. Re-open Visual Studio - the same error
  5. Edit the .csproj file - >go to the ProjectExtensions/VisualStudio/FlavorProperties, delete the entire FlavorProperties element.
  6. Reload the project


回答8:

try

  • reopening solution
  • renaming the solution file (.sln) to something else
  • deleting of "ProjectExtensions"