Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > .NET для новичков > Не отображается форма в конструкторе


Автор: V0fka 3.9.2013, 17:30
Привет!

Есть прога, написанная под Windows Mobile в SharpDeveloper-е. В нем все работает. Попробовал открыть проект в Visual Studio 2012 Professional. Оно сказало, что конвертнет, я согласился. Открываю одну форму и ловлю такую ошибку:

user posted image

Указанного типа в указанной сборке действительно нету. Но при этом прога компилируется и эта форма в программе открывается и вроде как работоспособна. В SharpDeveloper-е, повторюсь, с формой все в порядке и в конструкторе она рисуется нормально.

В VS это как-то можно полечить?

Автор: jonie 3.9.2013, 17:35
убери использование этого атрибута из файла .designer.cs

Автор: V0fka 3.9.2013, 17:49
В файле .Designer.cs поиск по Debugger ничего не показывает. Ровно так же, как и в любом другом файле .Designer.cs каждой формы проекта.

Автор: V0fka 11.9.2013, 09:00
Поискал в папке проекта, нигде текста DebuggerDisplayAttribute вообще нету. Что ж оно хочет..? smile 

Автор: jonie 11.9.2013, 10:15
Цитата(V0fka @  11.9.2013,  10:00 Найти цитируемый пост)
Что ж оно хочет..? 

цепляй отладчик и лови исключение в нём (отладчик вешай на студию).. и впедёт на разбор полётов, но он может сильно затянуться.

Автор: V0fka 12.9.2013, 16:34
Поцепил. В момент открытия формы ловит такое:

Цитата
Первый этап обработки исключения типа "System.TypeLoadException" в Microsoft.VisualStudio.Shell.Design.dll
Первый этап обработки исключения типа "System.TypeLoadException" в Microsoft.VisualStudio.Shell.Design.dll
Первый этап обработки исключения типа "System.TypeLoadException" в System.Design.dll
Первый этап обработки исключения типа "System.TypeLoadException" в System.Design.dll
Первый этап обработки исключения типа "System.InvalidOperationException" в System.Design.dll


Приложу ещё стек вызовов, который можно посмотреть, счелкнув по ссылке из первой картинки:

Цитата
в Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
в Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
в Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
в Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
в Microsoft.MetadataReader.TypeProxy.GetResolvedType()
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetRuntimeType(Type type)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.EnsureRuntimeType(Type type)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(ICustomAttributesDataProvider member, Type filter, CustomAttributesCache cache)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(Type type, Type filter, Boolean inherit, CustomAttributesCache cache)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(Type filter, Boolean inherit)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(Type type, Type filter)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Item(Type attributeType)
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Item(Type attributeType)
в System.ComponentModel.MemberDescriptor.get_DisplayName()
в Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkPropertyDescriptor.get_DisplayName()
в System.ComponentModel.MemberDescriptor..ctor(MemberDescriptor oldMemberDescriptor, Attribute[] newAttributes)
в System.ComponentModel.ReflectPropertyDescriptor..ctor(Type componentClass, PropertyDescriptor oldReflectPropertyDescriptor, Attribute[] attributes)
в System.ComponentModel.TypeDescriptor.CreateProperty(Type componentType, PropertyDescriptor oldPropertyDescriptor, Attribute[] attributes)
в System.Windows.Forms.Design.DocumentDesigner.PreFilterProperties(IDictionary properties)
в System.Windows.Forms.Design.FormDocumentDesigner.PreFilterProperties(IDictionary properties)
в System.ComponentModel.Design.ComponentDesigner.System.ComponentModel.Design.IDesignerFilter.PreFilterProperties(IDictionary properties)
в System.ComponentModel.Design.TypeDescriptorFilterService.System.ComponentModel.Design.ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
в System.ComponentModel.TypeDescriptor.PipelineFilter(Int32 pipelineType, ICollection members, Object instance, IDictionary cache)
в System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes)
в System.ComponentModel.Design.ComponentDesigner.InitializeInheritedProperties(Boolean rootComponent)
в System.ComponentModel.Design.ComponentDesigner.Initialize(IComponent component)
в System.Windows.Forms.Design.ControlDesigner.Initialize(IComponent component)
в System.Windows.Forms.Design.ParentControlDesigner.Initialize(IComponent component)
в System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
в System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
в System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
в System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
в System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
в System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
в System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
в System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
в System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
в Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
в Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)  

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)