38

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
  • 895
  • 1
  • 13
  • 32

9 Answers9

137

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.

Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
Kenneth Bo Christensen
  • 2,256
  • 2
  • 18
  • 21
  • 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. – vaindil Jan 20 '16 at 16:50
  • This worked for me as well. It should be the accepted answer. – Murven Feb 12 '16 at 18:38
  • 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. – osij2is Feb 15 '16 at 22:45
  • 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. – Josh Coulter Mar 30 '16 at 13:05
  • 2
    Solved the problem for me in VS 2015 Update 3. Thanks! – Steve Johnson Jun 29 '16 at 11:35
  • 1
    %LocalAppData% = C:\Users\username}\AppData\Local – Dhanuka777 Feb 20 '17 at 00:36
  • Had this today this fixed it! - previously tried: 1) uninstalled Web essentials + 2) repaired Microsoft ASP.NET RC1 Update 1, Update both did nothing – Andrew Feb 26 '17 at 10:45
  • Worked on Visual studio 2015. As @osij5is said, it removed the old cache and rebuilds a fresh one. This solved the issue. – matrix Apr 10 '17 at 08:35
  • 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. – Dave Cousineau Feb 26 '20 at 18:21
30

Close Visual Studio Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache Re-open Visual Studio

Matthew
  • 409
  • 4
  • 4
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).

slinhart
  • 562
  • 5
  • 17
  • 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. – Josh Schultz Dec 15 '15 at 02:03
3

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

2

I resolved this problem by deleting this folder: c:\Users\myusername\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache. and restarted visual studio. And it works correctly. In my system this problem is due to Bootstrap Snippet Packet extension and some related extension.They can be installed later.

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.

Patrick
  • 17,669
  • 6
  • 70
  • 85
  • 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 – EaranMaleasi Jun 07 '13 at 06:10
  • 1
    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. – DaveDev Jun 18 '13 at 10:18
  • 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. – EaranMaleasi Jun 20 '13 at 06:40
  • 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. – Patrick Jun 20 '13 at 11:36
  • This was not helpful. The answer below by Kenneth Bo Christensen is much more informed. – RominNoodleSamurai Apr 11 '16 at 14:56
  • 1
    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. – Patrick Apr 12 '16 at 06:46
0

I started getting this problem today every time I double-clicked on a .cshtml (MVC Razor) file.

I have Visual Studio 2015, with Update 3 installed along with Xamarin and the latest version of Resharper.

I looked in the Event Viewer where I noticed that every time it happened, I would get an event with ID 1001 from Windows Error Reporting. Here are some of the details from the event:

Fault bucket 126628082325, type 5 Event Name: VisualStudioNonFatalErrors Response: Not available Cab Id: 0

Problem signature: P1: devenv.exe P2: 14.0.25420.1 P3: unknown P4: vs/core/packageloadfailure P5: [XamarinIOSPackage] P6: unknown P7: unknown P8: CVsPackageMgr::CVsPackageInfo::LogHr P9: 0 P10: None

Attached files: \?\C:\Users{username}\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml \?\C:\Users{username}\AppData\Local\Temp\VSFaultInfo\161104_024954_7771968\ErrorInformation.txt \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER47B3.tmp.WERInternalMetadata.xml

These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportArchive\NonCritical_devenv.exe_147f9374de860c29317ae48d025a111977d1f_00000000_246b4a34

Analysis symbol: Rechecking for solution: 0 Report Id: da867a9f-a2c7-11e6-8298-a0369f8ee7a3 Report Status: 0 Hashed bucket: 75f36458281df055612fae225a6dcaa0

I don't see the connection between .cshtml and Xamarin but when I checked for an update to Xamarin (Tools->Options->Xamarin->Other->Check Now), there was an update waiting. I installed that update and that appears to have reset the Xamarin IOS installation and the problem no longer occurs.

So, my advice if you have Xamarin Tools installed and see this error and a corresponding event mentioning Xamarin, check for an update to Xamarin and apply it.

Phred Menyhert
  • 2,420
  • 4
  • 19
  • 19
0

I resolved the problem just by restarting the Visual Studio with "Run as Administrator".

Abdul Khaliq
  • 2,139
  • 4
  • 27
  • 31
-1

I got the same problem after installing MindScape for sass support. I had VS2015 update 2. Solution: Installing VS update 3 solved my problem. Download form : https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs