[每当我向Visual Studio 16.6 C#Windows Form程序添加UserControl时,它都不允许我为其打开设计器。相反,它将给我这个错误“期望代理类型,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.ComponentProxy。”该代码有效,我可以查看并运行它,只是无法在设计器中编辑UserControl。
这里是调用堆栈...
“在Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.Extensions.ToComponentProxy(Object obj)在Microsoft.VisualStudio.WinForms.RemoteClient.DesignerSession.InitializeRootComponent(CodeTypeDeclaration typeDeclaration,ResourceContentData [] resourceDocDataContent)在Microsoft.VisualStudio.WinForms.RemoteClient.Loader.RemoteCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager管理器)在Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)---从之前引发异常的位置开始的堆栈结束跟踪---在Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)在System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost主机)“
尝试删除.vs文件夹并重新启动VS。 .vs文件夹与解决方案位于同一文件夹中。