none
XAML设计器异常 RRS feed

  • 问题

  • 从Blend里打开xaml文件后,不做操作几秒钟后,设计器挂了,报出如下错误:

    (VS可以正常打开,但是有时候编译后也就挂了)

    System.InvalidOperationException
    Unable to change after type has been created.
       at System.Reflection.Emit.TypeBuilder.ThrowIfCreated()
       at System.Reflection.Emit.TypeBuilder.DefinePropertyNoLock(String name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
       at System.Reflection.Emit.TypeBuilder.DefineProperty(String name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
       at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeDefinition.InternalGetProperty(String propertyName, Type propertyType, Type[] indexParameters, Boolean isStatic, Func`2 createPropertyDefinitionCallback)
       at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeDefinition.GetProperty(String propertyName, Type propertyType, Type[] indexParameters, Boolean isStatic)
       at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeDefinition.ImplementAbstractProperty(PropertyDefinition property, Boolean shouldOverride, Func`1 emitBackingField, Action`3 emitGetMethodBody, Action`3 emitSetMethodBody)


    2015年6月9日 7:46

全部回复

  • 你好 NailClipper

    尝试下修复Visual Studio是否有帮助吧。这个错之前没见过,看起来好像是XAML designer读取XML的时候出问题了,重启下试试看呢。

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年6月10日 8:58
    版主
  • 修复VS也不行,感觉是更新10130后才出现的。昨天试了下再另外一台笔记本装了10135就没有出现
    2015年6月11日 1:43
  • 我这里的Win10也没有出现这样的问题,可能跟环境有关系吧。要不就找个稳定的测试版本开发,目前Win10是预览阶段,我自己这里的问题也有,可以通过桌面的反馈工具直接给产品组反馈吧。

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    2015年6月12日 6:19
    版主