21

After installing AspNet5.ENU.RC1 any previous or new MVC project throws a

The operation could not be completed. Invalid pointer

error when opening razor pages (.cshtml). Other files such as class libraries and config files open as expected. Any suggestions before I reinstall VS?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
MykeDu
  • 301
  • 1
  • 3
  • 16
    try open the folder: Users\\AppData\Local\Microsoft\VisualStudio\\ delete the folder: ComponentModelCache restart Visual Studio. – chsword Nov 21 '15 at 08:21
  • 1
    I still had error after deleting ComponentModelCache folder and restarting VS; however, I deleted the whole parent folder (14.0) and after restarting VS, it started behaving again :) Thank You for taking me down this path. I have another work computer that is behaving this way after performing the RC1 upgrade. I feel better that I don't have to reinstall!! – MykeDu Nov 21 '15 at 10:06
  • 1
    @chsword: Thanks for that! I was running into the same problem. – afrazier Nov 24 '15 at 19:17
  • 1
    thanks i wasted now an hour on this will try it – CMS Dec 03 '15 at 02:07
  • 1
    AND YES!!!! ow yeh!! worked. thanks a mi – CMS Dec 03 '15 at 02:10
  • 1
    Had this problem in Visual Studio 2015 and it worked. Thanks :) – Ilyas Dec 03 '15 at 09:26
  • Yes! Saved my morning! :) – Pelle Mar 05 '16 at 11:25
  • @chsword Men you're awesome! – Grigory Bushuev Mar 31 '16 at 08:14

1 Answers1

36

As @chsword commented above:

  1. Open the folder: Users\(user)\AppData\Local\Microsoft\VisualStudio (version)

  2. Delete the folder: ComponentModelCache

  3. Restart Visual Studio (ComponentModelCache is re-created and the problem goes away)

DeveloperDan
  • 4,626
  • 9
  • 40
  • 65
CMS
  • 3,657
  • 1
  • 27
  • 46
  • 1
    One day headache then desperately try everything from the web and finally this. – L.Trabacchin Dec 09 '15 at 16:51
  • 1
    Same here after 6 hours reinstalling Visual Studio doesn't work, later try this and that is all. Thansk – Adhemar Jan 25 '16 at 12:57
  • 2
    You are awesome. Thanks! – Ghasem Tabatabaei Jan 29 '16 at 14:21
  • 3
    for VS2015 you can just cut and paste this into `Start > Run` : %localappdata%\Microsoft\VisualStudio\14.0\ and you'll see the folder right away – Simon_Weaver Jun 20 '16 at 21:43
  • This required 2 restarts for me. After removing that folder and restarting, I get the error: The 'CctProjectPackage' package did not load correctly.' But I can now open csvhtml files. After the second restart, it seems fine. VS2015 Update 3 – Moby Disk Jan 24 '17 at 21:20