0

我创建了一个新的 .netstandard2.0 MDrivenEcoSpaceAndModelForNetStandard2 项目。创建它时,我无法打开生态空间或 PMP 组件设计器。我正在使用 Microsoft Visual Studio Enterprise 2019 版本 16.8.4 和 MDriven 框架版本 7.0.0.12868。打开 PMP 时出现以下错误。(顺便说一句,谢谢,我很高兴看到对 .net 标准的支持。期待解决这个组件设计器问题并且一切正常。将我的所有项目转换为 .net 标准/核心是一条很长的路)。任何帮助是极大的赞赏。

“自定义属性签名中不支持的类型参数。”

此错误的实例 (1)

调用堆栈

在 Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type) 在 Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index) 在 Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList1& namedArguments) 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData() 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()。 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(类型类型,类型过滤器,布尔继承,CustomAttributesCache 缓存)在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(类型)的 GetCustomAttributes(ICustomAttributesDataProvider 成员,类型筛选器,CustomAttributesCache 缓存)过滤器,布尔继承)在 Microsoft.VisualStudio.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(类型类型,类型过滤器)在 Microsoft.VisualStudio。Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes() 在 Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component) 在 Microsoft.VisualStudio.Design.VSDesignSurface .CreateInstance(类型类型)在 System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(类型 componentType,字符串名称)在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(类型类型,ICollection 参数, System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance 处的字符串名称,布尔 addToContainer)(类型类型,ICollection 参数,字符串名称,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 上的 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 上的异常发生位置的堆栈跟踪结束。 CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)OnLoadCompleted(Int32 fReload)

打开生态空间时调用堆栈略有不同:

此错误的实例 (1)

调用堆栈

在 Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type) 在 Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index) 在 Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList1& namedArguments) 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData() 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()。 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(类型类型,类型过滤器,布尔继承,CustomAttributesCache 缓存)在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(类型)的 GetCustomAttributes(ICustomAttributesDataProvider 成员,类型筛选器,CustomAttributesCache 缓存)过滤器,布尔继承)在 Microsoft.VisualStudio.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(类型类型,类型过滤器)在 Microsoft.VisualStudio。Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes() 在 Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component) 在 Microsoft.VisualStudio.Design.VSDesignSurface .CreateInstance(类型类型)在 System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(类型 componentType,字符串名称)在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(类型类型,ICollection 参数, System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance 处的字符串名称,布尔 addToContainer)(类型类型,ICollection 参数,字符串名称,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 上的 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 上的异常发生位置的堆栈跟踪结束。 CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)OnLoadCompleted(Int32 fReload)

PMP 错误

生态空间错误

4

1 回答 1

0

MDriven 对新的项目文件格式存在实际问题。它在 Visual Studio 的 CodeGen 和 Save 扩展中的行为非常不同。

然而,这现在得到了改进,我们认为从 7.0.0.12950 及更高版本开始一切都很好。

当谈到 EcoSpace 和 PMP 的开放设计器时,我们仍然遇到问题 - 但似乎我们并不孤单,因为在尝试打开 winforms 设计器时会出现同样的问题。我们需要看看 Visual Studio 未来版本如何处理这个问题。

解决方法是将文件链接到 .netFramework 项目并在那里编辑它们 - 但在 .netstandard/core 中编译它们

于 2021-03-01T14:55:12.007 回答