WorkItem Decendents Not working in IDE

Topics: CAB & Smart Client Software Factory
Nov 18, 2005 at 7:13 AM
originally posted by: ScottSD

Since upgrading to the November release, all the WorkItem decendents in my modules are marked as Components , when you click on them in the solution explorer the IDE displays

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: JobControlWorkItem --- The base class 'Microsoft.Practices.CompositeUI.WorkItem' cannot be designed.
Hide

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)


Any Suggestions.
Nov 18, 2005 at 7:25 AM
originally posted by: gamania

i got the same problem..but don't know why bankteller workitem is not doing that way..:S
Nov 18, 2005 at 7:41 AM
originally posted by: ScottSD

I have just editied the BankTeller Application and removed the CAB Project and made the BankTeller reference the DLL directly and now it has the same issue.
Nov 18, 2005 at 7:45 AM
originally posted by: BradWilsonMSFT

This is very strange. I'm looking into it. Thanks!
Nov 18, 2005 at 7:51 AM
originally posted by: BradWilsonMSFT

I have a simple work-around. This seems to be related to some unnecessary attributes on the WorkItem class. If you delete the ToolBoxItem and DesignerCategory attributes from the WorkItem class, then recompile CAB, this problem should go away.

I'm not sure why this happens, though. The decision for whether something is a component or not should come from whether it implements IComponent, not the presence (or absence) or some attributes. I'm still investigating.
Nov 18, 2005 at 7:55 AM
originally posted by: ScottSD

The IDE must use the attribute and look to launch a component designer.
Nov 18, 2005 at 7:55 AM
originally posted by: ScottSD

if you remove the

ToolboxItem(false)
DesignerCategory("Component")

attributes from the WorkItem class it all goes away.
The unit test all still run so I can only guess its OK.

I'm not sure why this class would have been marked as a designer category of Component when its not.
Nov 18, 2005 at 7:57 AM
originally posted by: ScottSD

Anyway thanks for a really speedy response.
Release CAB looks good. A whats changed since October Doc would be good though.
The disaperance of the UIElementService caught me out.