locked
Wrong icon in the solution explorer for my class RRS feed

  • Question

  • Hi, I create a class VS2010 and as i add its inheritance to an abstract class the icon in solution explorer changes to an windows form where as you dubbleklick it as to view the code  VS crashes as reboots, i mean its not a windows form and if it tries to start the viewer well then a crash seems unavoidable as its not a w-form. Now the problem, how do i stop it from doing this? Is there a setting i am missing? Good part in all of this is i am learning everything there possible is about inheritance of interface,abstract and  regular subclasses. ;)
    Saturday, February 16, 2013 5:08 PM

Answers

  • If the abstract base class derives from Form (or control?) at any point in the class heierarchy, I believe the icon changes.  Could this be the case?

    --
    Mike
    • Marked as answer by Bob Shen Tuesday, February 26, 2013 3:18 AM
    Saturday, February 16, 2013 6:02 PM

All replies

  • Open  the class you have created in a notepad outside VS2010 & check the Class Name & inherited part. Remove the inheritance part & save the file. Try opening the solution in Vs2010 & open the same class to view it in code editor. If the class is opened without error then the issue is in implementation. But if u still get error opening then copy the code to investigate further...

    It all Happenz Sendil

    Saturday, February 16, 2013 5:57 PM
  • If the abstract base class derives from Form (or control?) at any point in the class heierarchy, I believe the icon changes.  Could this be the case?

    --
    Mike
    • Marked as answer by Bob Shen Tuesday, February 26, 2013 3:18 AM
    Saturday, February 16, 2013 6:02 PM
  • That was the case but i have reworked the entire solution so it dont do it anymore where i am curiuos as to why it still show...Do i need to rebuild the whole thing perhaps.
    Saturday, February 16, 2013 8:15 PM
  • I will try it! brb :)

    I tried to do this but as soon as i set the inheritance the icon changes to windows form. :/

    • Edited by andbol Saturday, February 16, 2013 8:20 PM
    Saturday, February 16, 2013 8:15 PM
  • Yes, you must rebuild, I believe.

    --
    Mike
    Saturday, February 16, 2013 10:10 PM