cbradley
cbradley

Reputation: 91

Can't view any Designer with a user Control on It

I'm using visual studios 2017, vb.net, winforms.

On every form that contains a user control I am getting the display: "To prevent possible data loss before loading the designer, the following errors must be resolved:".

with the error message: Error HRESULT E_FAIL has been returned from a call to a COM component.

I have tried creating a new user control and adding it to a new form and I get the same result. The display appears after reopening a form that has a user control on it.

The program itself works fine it's only the designer that I can not see.

I would appreciate any advice why this might be occurring as it doesn't seem to be code related.

It might possibly be related to me using resharper to remove any unused reference or me running it on my laptop (Also vs2017).

Thanks In Advance

The Stack Trace is: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.Exceptions.ThrowEFail() at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.LookupTypeSymbol() at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.get_TypeKind() at EnvDTE.CodeTypeRef.get_TypeKind() at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.GetUrtTypeFromVsType(CodeTypeRef vsType) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnTypePopulateMembers(Object sender, EventArgs e) at System.CodeDom.CodeTypeDeclaration.get_Members() at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.CodeTypeDeclarationPopulator.OnPopulateMembers(Object sender, EventArgs e) at System.CodeDom.CodeTypeDeclaration.get_Members() 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 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

Upvotes: 2

Views: 1230

Answers (1)

cbradley
cbradley

Reputation: 91

Figure out the problem. For some reason there was a reference that pointed towards the project itself. The designer returned when I removed the reference.

Upvotes: 7

Related Questions