Designer Broken with UserControl

1 Answer 220 Views
Form
Jérôme
Top achievements
Rank 1
Iron
Iron
Iron
Jérôme asked on 11 Jan 2024, 09:01 AM

Hi,

It seems after upgrading to the latest Nuget version of UI.for.WinForms.AllControls.Net70" (Version="2023.3.1114") I ran into the following issue when opening the designer :

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization.Schema, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Le fichier spécifié est introuvable.
                        File name: 'System.Runtime.Serialization.Schema, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

 

After the designer shows up, every custom user control I'm using on it (based on Telerik controls) completely disappear.

If I make a single change and save the file, I can confirm that all of them are gone, looking at the diff with Git.

I'm wondering if it's a Telerik or a Visual Studio issue, but either way, the result is that I can't work anymore on this project.


Jérôme
Top achievements
Rank 1
Iron
Iron
Iron
commented on 11 Jan 2024, 01:26 PM

In addition, here is the error popup I'm getting when trying to drop one of my custom controls on the designer :

« Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: Constructor on type 'NDC.WinUI.Controls.NdcTextBox' not found.

   à Microsoft.DotNet.DesignTools.Client.DesignToolsClient.<SendRequestAsync>d__49`1.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()

   à Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()

   à Microsoft.DotNet.DesignTools.Protocol.Endpoints.DesignToolsEndpoints.DesignerHostsImpl.CreateComponent(SessionId sessionId, TypeIdentity type, String name, NameValuePairs defaultValues)

   à Microsoft.WinForms.DesignTools.Client.Toolbox.WinFormsToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

   à System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

   à Microsoft.DotNet.DesignTools.Client.Designers.ComponentProxyDesigner.CreateTool(ToolboxItem tool, Nullable`1 location, Nullable`1 size, ObjectProxy toolboxSnapArgs) »

1 Answer, 1 is accepted

Sort by
0
Jérôme
Top achievements
Rank 1
Iron
Iron
Iron
answered on 11 Jan 2024, 01:35 PM
I think I found the culprit : these custom controls needed to have a parameterless constructor (it's strange it's been working without it until now though...)
Nadya | Tech Support Engineer
Telerik team
commented on 11 Jan 2024, 03:09 PM

Hello, Jérôme,

According to the provided information so far it seems that you managed to resolve the issue that you had with your custom controls. I am glad to hear that.

In case you have any other questions regarding controls from Telerik UI for WinForms suite do not hesitate to contact us.

Tags
Form
Asked by
Jérôme
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Jérôme
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or