简体   繁体   中英

I can't use my User Control Component in Windows Form

The 'MeButton' component could not be created. The error message is as follows: 'Microsoft.DotNet.DesignTools.Client.DesignToolsSeiverExcept ion: 'Ecommerce Desktop.Base.MeButton, Ecommerce Desktop.The type 'Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. location: Microsoft.DotNet.DesignTools.Client.DesignToolsClient.d_49.1.MoveNext0 --- the end of the stack trace starting from the previous location where the exception was created ---location: System.Runtime.ExceptionSeivices.ExceptionDispatchInfo.Thro wQ location: System.Runtime.CompilerSeivices.TaskAwaiter.HandleNonSucc essAndDebuggerNotification(Task task) Location: Microsoft.VisualStudio.ThreadingJoinableTask.CompleteOnC urrentThread0 Location: Microsoft.VisualStudio.ThreadingJoinableTaski.CompleteOn CurrentThread0 location: Microsoft.DotNet.DesignTools.Protocol.Endpoints.DesignTool sEndpoints.DesignerHostslmpl.createComponent(Sessionld sessionld, Typeldentitytype, String name, NameValuePairs defaultValues) Location: Microsoft.WinForms.DesignTools.Client.Toolbox.WinFormsToo lboxItem.CreateComponentsCore(IDesignerHost host, idictionally defaultValues) location: System.Drawing.Design.ToolboxItem.createComponents(Ide gnerHost host, idictionally defaultValues) location: Microsoft.DotNe t.DesignTools.Client.Designers.ComponentPr owDesigner.CreateToolgoolboxItem tool, location, Nullablei size, ObjectProxytoolboxSnapArgsy

I get such an error when I drag User Control to the form from the Toolbox.

I just created a User Control, I didn't do anything, but it still didn't happen.

User control and winforms are in the same library. i am working with dependency injection

the problem was solved when I updated visual studio

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM