When trying to load a user control in design mode I get the following error on a new machine “Value cannot be null. Parameter name: Instance”
call stack:
at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
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)
The project has the “Wijsej-3 3.2.2” NuGet package installed.
We also installed the VS extention “Wisej.NET-3-VS2022-3.2.2”
Target framework is net48.
The new machine is running VS 2022. If I copy the solution folder to another machine, the solutions loads and the user control loads in the designer without any issues.
The project compiles without errors. I am at a loss as to what to try next.
Frank’s post on fixing VS hanging by updating to WiseJ.net 3.2 lead me to the solution to my issue.
I don’t know how this happened but when installing the VS extention “WiseJ.net 3.2”, it installed disabled.
Once I enabled the extention and restarted VS2022 it worked as expected and the user control showed in the designer.
Thanks,
Shawn R
Please login first to submit.