'VS2019 - User Control - The Designer Cannot Be Shown for Imported User Control
This is happening only now that we have migrated to Visual Studio 2019. This is in Win Forms, VB.NET.
We have a Control (baseControl) which inherits User Control in Project A. We then have a Control (newControl) which inherits baseControl.
All good in Project A.
When both baseControl and newControl are imported to Project B:
- baseControl can be designed; no problem.
- newControl cannot be designed. The following Call Stack is shown:
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) --- End of stack trace from previous location where exception was thrown --- 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)
"Import" means: Right-click the Project, and select "Add" → "Existing Item..." Then, select:
- baseControl.vb
- baseControl.resx
- newControl.vb
- newControl.resx
Most confusing is that baseControl can be designed in Project B, while the Class / Control inheriting it cannot.
This did not happen while still using Visual Studio 2010.
All assistance appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
