none
Error thrown on Visual Studio 2015

    Question

  • hello,

    Conditions: OS Windows 10 (32bits), Vs 2015 community update 3

    In design mode if i click over a button, which is supposed to send you to the code associated to with click event, i get the error: Value does not fall within the expected range: the tab has been closed

    Anu one in here can tell me why that happens? It ihappens in all projects in the solution!!!.

    Thanks

    Wednesday, November 02, 2016 6:47 PM

Answers

  • Hi Lana,

    I tried first to repair Visual Studio 2015 Community Update 3, using a fresh .iso file. Not worked. But  i tried to  delete all files in C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache and now it Works again!.

    Visual studio seems to be very sensitive to Windows 10 major updates. So it seems to be a good idea to repair it after any Windows 10 major update.

    So SOLUTION: delete everything under C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

    Thanks


    • Edited by menorca Friday, November 04, 2016 8:46 AM
    • Marked as answer by menorca Friday, November 04, 2016 8:47 AM
    Friday, November 04, 2016 8:45 AM

All replies

  • Hi menorca,

    For this issue, we need to figure out the root cause is about your solution or your VS.

    So there is a clarification with you:

    Under the same solution, create different type projects, such as Winform, UWP (Which contains form).

    (1)    All these project suffers same error, the solution could have trouble.

    How about creating a new solution, copy just one previous project under the new solution.

    If the project works fine, it indicates that the root cause is in the old solution,

    Please delete its .suo file, and re-build it again, the .suo file will generate again by default.

    (2)     If just one type project has this error, this template could be broken.

    You can try this to restore missing templates:

    Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE ;

    1.Delete the ItemTemplatesCachefolder;

    2.Open Visual Studio Command Prompt  under Start menu -> All Programs -> Microsoft Visual Studio 2015 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);

    3.Run the devenv /InstallVSTemplates switch;

    Refer to:

    https://msdn.microsoft.com/en-us/library/ms247116(v=vs.100).aspx

    4.Run the devenv /Setup switch

    By the way, please tell us when does this happen, after using VS for some time or once you installed the VS 2015 community with Update 3?

    If you got this error when installing some third-party extensions, please share us these packages, we could test on our side to see if the same situation occurs.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Thursday, November 03, 2016 9:06 AM
    Moderator
  • Hi Lana,

    I tried first to repair Visual Studio 2015 Community Update 3, using a fresh .iso file. Not worked. But  i tried to  delete all files in C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache and now it Works again!.

    Visual studio seems to be very sensitive to Windows 10 major updates. So it seems to be a good idea to repair it after any Windows 10 major update.

    So SOLUTION: delete everything under C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

    Thanks


    • Edited by menorca Friday, November 04, 2016 8:46 AM
    • Marked as answer by menorca Friday, November 04, 2016 8:47 AM
    Friday, November 04, 2016 8:45 AM
  • Hi menorca,

    Glad to hear you have had your issue resolved. And thanks for sharing us your solution and result here.

    Have a nice day:)

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 04, 2016 8:49 AM
    Moderator