UserControls and Components not available!

Topics: CAB & Smart Client Software Factory
Jul 11, 2006 at 5:20 PM
originally posted by: DotNetRules

Hi,

I’ve noticed in the latest release of the CAB that custom Components and UserControls that are part of my business module project are not available in the VS 2005 Toolbox. Does anyone know of a workaround for this?

Thanks
Jul 11, 2006 at 5:51 PM
originally posted by: askew

I misunderstood you, sorry...

Will they reload manually?
Jul 12, 2006 at 5:20 AM
originally posted by: austinlamb

This is a known issue in VS 2005 - if your project is in a Solution Folder, none of your UserControls will show up in th Toolbox (regardless of the ToolboxVisible attribute on the class).

I've not heard if this is to be fixed in any coming hotfix or SP1 of VS 2005, but this issue has been diagnosed a while and I think it's still around, so I guess it's not too high-priority?

Anyway, the only workaround I'm aware of is to not put any project with a UserControl that you want to have in the Toolbox, into a Solution Folder - keep them in th solution root.
Jul 14, 2006 at 6:15 PM
originally posted by: DapinderSingh

I have checked a scenrio in which if i have 2 projects, one an exe project and other one is assembly project and now if I add both these projects under same solution and add the user controls in the assembly project in the toolbox, they are displayed perfectly fine in the toolbox. Also, if I drop these user controls on any of the UI module, they work fine without throwing any error.

Please correct me if I am wrong in understanding this problem. It may be some other problem.
Jul 14, 2006 at 6:15 PM
originally posted by: DapinderSingh

I have checked a scenario in which if i have 2 projects, one an exe project and other one is assembly project and now if I add both these projects under same solution and add the user controls in the assembly project in the toolbox, they are displayed perfectly fine in the toolbox. Also, if I drop these user controls on any of the UI module, they work fine without throwing any error.

Please correct me if I am wrong in understanding this problem. It may be some other problem.
Jul 14, 2006 at 6:31 PM
originally posted by: DotNetRules

It seems to be related to UserControls that are in Solution Folders, I found this out by creating a CAB project using the Guidance Automation project. To replicate:

1. Create a project based on the Guidance Automation project.
2. Add a standard UserControl to the Infrastructure.Layout project and rebuilt the solution.
3. Open the ShellLayoutView and look for the UserControl in the Toolbox, you’ll notice its no where to be seen.

If I create a Business Module Project with UserControls in the root of the solution everything works as expected, however, if I create a new Solution Folder and move the project into it the UserControls disappears from the Toolbox. I think this is an issue with ‘Solution Folders’ which are a kind of virtual folder (I think as they don’t show in the file system). I found this VS bug which maybe related: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=139643&SiteID=1&PageID=1