The Operation could not be completed: Invalid Pointer
Solution 1
I had a similar issue, and for some strange reason, renaming the solution file (.sln) to something else resolved the issue.
I haven't figured out why though.
Edit: Please have a look at the other answers before trying this one out since there might be one that suits your problem more specifically. The answer above solved an issue that was caused by something that normally doesn't happen, and can't really be reproduced, whereas the answers below are caused by something specific.
Solution 2
This is an old thread but the same symptom has come back but based on a new cause. I got the error after installing ASP.NET 5 RC1. I solved the problem by deleting this folder:
Users\{yourusername}\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
(or %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
), and afterwards restarted Visual Studio.
Solution 3
Close Visual Studio Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache Re-open Visual Studio
Solution 4
I was having this problem briefly, I immediately came to this thread and renaming the solution did not work for me. However, once I restarted visual studios and reopened the issue went away (and has not come back since).
Solution 5
I had this problem once before and found this thread, and found this thread again today when the problem reappeared after I installed a bunch of extensions.
On the earlier occasion, uninstalling Asp.net 5 RC1 worked per an answer given above. However, this time I was unwilling to uninstall it since I wanted Asp.net 5 RC1 to continue to be available. I also wanted to avoid uninstalling the new extensions.
So I tried the alternate answer, to close VS2015 and delete the contents of c:\Users\myusername\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache. Leaving that folder open (and empty) while restarting VS2015 and reopening my project showed the four files (cache, catalogs, err, and external) repopulating. I was then able to open the files that had been causing the pointer error.
Bottom line: I would recommend cleaning out ComponentModelCache fix over uninstalling ASP.net 5 RC1, especially for anyone who would like to move forward instead of backward. :)
EaranMaleasi
Application developer with main knowledge in .NET development and mobile development with C#
Updated on May 02, 2020Comments
-
EaranMaleasi almost 4 years
Update:
Below you will find answers that are mostly connected to ASP.NET issues and not the question I originally had. If you have any issues regarding ASP.NET scroll down and ignore the Answer that is marked as solution, as I had some extremely rare case that I haven't encountered again so far.
Original Question:
for a few days i have a problem with my visual studio here. everytime i want to open an Android landscape layout (default layouts load normally) it tells me "The Operation could not be completed: Üngültiger Zeiger" (Invalid Pointer) (english studio on a german Win 7) i've found some threads in different forums, but most were related to a font change, what i never did. my font is Consolas right nowanother thing i found was this one: Link
but i never found those lines in my .csproj filesso... what is wrong here?
-
EaranMaleasi almost 11 yearsthanks for the answer but i can't test it, because i did sth i don't know anymore (maybe deleting and recreating the layout files). but if this happens again i wil sure test that
-
DaveDev almost 11 yearsSo did this work or not? I did what is described here and it didn't work. You claim that you couldn't test it but still marked the answer as correct.
-
EaranMaleasi almost 11 yearsmaybe try to delete the files (not only in VS but in your VS folder on your PC. sometimes VS tells me its deleted but it was not..) and recreate them. copy all you have done in the old files into the new ones and it could work.
-
Patrick almost 11 yearsI got this error when trying to open a xaml file, but I got the exact same error, so I figured the designer had the same mishap. Since there are a few "solutions" to this I just wanted to get this out there in case it helped someone else.
-
Josh Schultz over 8 yearsA simple restart didn't work for me, so I disabled my extensions and restarted again. Worked after that. In my case I was having an issue with ASP.NET Razor file, and disabled the Web Essentials extension.
-
vaindil over 8 yearsI'm getting this on VS 2015. Uninstalling ASP.NET 5 RC1 (the current version) fixed the problem for me. I'm not using it, doesn't matter to me to uninstall it. It was installed automatically as part of an update to Application Insights. I only needed to uninstall ASP.NET itself, not Application Insights.
-
Tiago Crizanto about 8 yearsThe same response mentioned above
-
Murven about 8 yearsThis worked for me as well. It should be the accepted answer.
-
osij2is about 8 yearsThis totally worked. Note - after restarting Visual Studio 2015, it will rebuild the folder and items inside of it, but that makes all the difference.
-
Josh Coulter about 8 yearsAnother thank you from a satisfied reader! The only thing that had changed in my environment was an update to a GitHub and a Windows Phone SQLite extension this morning, rendering my .cshtml files unopenable in VS 2015.
-
RominNoodleSamurai about 8 yearsThis was not helpful. The answer below by Kenneth Bo Christensen is much more informed.
-
Patrick about 8 yearsWell, it solved my issue at the time, and unfortunately I cannot remove this answer now since it is the accepted one. Safe to say, this issue can appear in different cases, and can be solved in different ways.
-
Steve Johnson almost 8 yearsSolved the problem for me in VS 2015 Update 3. Thanks!
-
Ed Williams over 7 yearsDid this, no change. Trying others. :s
-
Eric D. Johnson about 7 yearshad The Operation Could not be Completed Invalid Pointer on
Index.cshtml
and this did the trick, thanks @Matthew. -
Dhanuka777 about 7 years%LocalAppData% = C:\Users\username}\AppData\Local
-
Andrew about 7 yearsHad this today this fixed it! - previously tried: 1) uninstalled Web essentials + 2) repaired Microsoft ASP.NET RC1 Update 1, Update both did nothing
-
matrix about 7 yearsWorked on Visual studio 2015. As @osij5is said, it removed the old cache and rebuilds a fresh one. This solved the issue.
-
Dave Cousineau about 4 yearsDidn't expect this to work but it did. ASP.NET 4 projects were getting "The Operation could not be completed" every time they attempted to generate the code behind fields, so the fields were never up to date unless I manually updated them. After deleting ComponentModelCache from two different version 15 folders, after restarting VS 2019 the problem is gone.