none
Implementing IComponent does not show up in Toolbox, but inheriting Component does

    Question

  • I am using Visual Studio 2015 and have a problem with components auto populating in the Toolbox. If I create a class and inherit System.ComponentModel.Component, it will show up in the Toolbox. But if I create a class that implements IComponent, it will not show up in the Toolbox.

    I can open the same solution with VS2013 and both classes show up in the Toolbox as expected.

    Does VS2015 have a special requirement for making a component auto populate in the Toolbox?

    Monday, February 22, 2016 9:05 PM

All replies

  • This problem seems to have resolved itself and I am not exactly sure how. While trying to isolate the problem, the second component started showing up in the Toolbox. This is what I did when it started working:

    - Go to the Properties of the project

    - Select the Debug tab

    - Set the start action to Start External Program

    - Set the program to start to devenv.exe found in the Visual Studio directory

    - Started debugging and it opened a new VS instance

    - From the second instance, opened the same project

    - Opened a form in Design View

    - I noticed both components were in the ToolBox

    - I closed the second instance and went back to normal debugging


    Tuesday, February 23, 2016 12:33 AM
  • Hi Archie,

    Glad to know that this issue has been resolved, since it works well now, I will close this case for you, if possible, you could mark your reply as the answer, so it would be helpful for other members who get the same issue.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 23, 2016 7:34 AM
    Moderator
  • This continues to be a problem. I once again do not have my components that implement IComponent showing up in the Toolbox. I tried many different things and cannot get it to work. If I open the same solution in VS2013, it works fine.

    This is not isolated to my computer because I have had many reports from other users of the software saying they have the same problem.

    Wednesday, April 13, 2016 1:29 AM
  • Hi Archie,

    Since it worked well in VS2013, just the VS2015 has this issue, to really repro this issue, could you share us a simple sample using one drive?

    Please also share us the detailed steps about how we could repro this issue, you could upload a screen shot about the real result in your new reply.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 13, 2016 5:45 AM
    Moderator
  • Here is the project I am using:

    https://onedrive.live.com/redir?resid=28CA08C411D6BFDE!3055&authkey=!APRU6KQQJr7IIBk&ithint=file%2czip

    There are 2 screen shots in that are showing the Toolbox in VS2013 and VS2015 with the same project. The AdvancedHMIDrivers is the one that has missing components.

    Wednesday, April 13, 2016 7:38 AM
  • Another way to replicate this is to start a new WinForms project in VS2015. Then add a new class. In that class enter:

    Implements System.ComponentModel.IComponent

    Let it automatically complete the required code. Build the project. Open Form1 and check in the Toolbox. You should see your new class, but it doesn't always show up.

    Open the same solution in VS2013 and you will see the new class in the Toolbox


    • Edited by Archie Wednesday, April 13, 2016 1:21 PM
    Wednesday, April 13, 2016 1:20 PM
  • Hi Archie,

    It seems that I couldn't visit the project shared by you in the onedrive.

    To get the issue confirmed and diagnose by product team, would you please create connect report for it? You will get email notification for update.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    You could upload the project sample to the connect report, so the product team could really repro this issue, I will also download and test it in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 19, 2016 2:38 AM
    Moderator
  • I submitted it as a bug report. I also created a very simple project to show the issue:

    https://onedrive.live.com/redir?resid=28CA08C411D6BFDE!3067&authkey=!ACRACGRhGc-o2Lw&ithint=file%2czip

    If you open the project in VS2015, you see only 1 component in the Toolbox. Open it in VS2013 and you see both components.

    Tuesday, April 19, 2016 3:01 AM
  • Hi Archie,

    I think I could repro this issue in my VS2015, I don't setup the VS2013, but just test it in my VS2012, it works normally in VS2012. So I agree with you, it would be a real issue in VS2015.

    As you already submit one feedback on the Microsoft Connect site, let's focus on the case on that channel, may the senior members can provide more professional support.

    https://connect.microsoft.com/VisualStudio/Feedback/Details/2606706

    I also help you vote it.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, April 19, 2016 4:36 AM
    Moderator