The Operation could not be completed: Invalid Pointer

20,306

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

Share:
20,306
EaranMaleasi
Author by

EaranMaleasi

Application developer with main knowledge in .NET development and mobile development with C#

Updated on May 02, 2020

Comments

  • EaranMaleasi
    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 now

    another thing i found was this one: Link
    but i never found those lines in my .csproj files

    so... what is wrong here?

  • EaranMaleasi
    EaranMaleasi almost 11 years
    thanks 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
    DaveDev almost 11 years
    So 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
    EaranMaleasi almost 11 years
    maybe 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
    Patrick almost 11 years
    I 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
    Josh Schultz over 8 years
    A 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
    vaindil over 8 years
    I'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
    Tiago Crizanto about 8 years
    The same response mentioned above
  • Murven
    Murven about 8 years
    This worked for me as well. It should be the accepted answer.
  • osij2is
    osij2is about 8 years
    This 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
    Josh Coulter about 8 years
    Another 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
    RominNoodleSamurai about 8 years
    This was not helpful. The answer below by Kenneth Bo Christensen is much more informed.
  • Patrick
    Patrick about 8 years
    Well, 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
    Steve Johnson almost 8 years
    Solved the problem for me in VS 2015 Update 3. Thanks!
  • Ed Williams
    Ed Williams over 7 years
    Did this, no change. Trying others. :s
  • Eric D. Johnson
    Eric D. Johnson about 7 years
    had The Operation Could not be Completed Invalid Pointer on Index.cshtml and this did the trick, thanks @Matthew.
  • Dhanuka777
    Dhanuka777 about 7 years
    %LocalAppData% = C:\Users\username}\AppData\Local
  • Andrew
    Andrew about 7 years
    Had this today this fixed it! - previously tried: 1) uninstalled Web essentials + 2) repaired Microsoft ASP.NET RC1 Update 1, Update both did nothing
  • matrix
    matrix about 7 years
    Worked on Visual studio 2015. As @osij5is said, it removed the old cache and rebuilds a fresh one. This solved the issue.
  • Dave Cousineau
    Dave Cousineau about 4 years
    Didn'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.