Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2013 giving The operation could not be completed. Invalid pointer on Razor views

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.

like image 258
DotnetSparrow Avatar asked Aug 24 '15 10:08

DotnetSparrow


3 Answers

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.

like image 141
jslatts Avatar answered Nov 19 '22 08:11

jslatts


Installing Visual Studio 2015 Update 1 fixed this for me:

  • https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx
like image 28
franzo Avatar answered Nov 19 '22 07:11

franzo


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

like image 1
Emil Avatar answered Nov 19 '22 07:11

Emil