【问题标题】:VS2012 Winform designer errorVS2012 Winform 设计器错误
【发布时间】:2013-12-04 20:46:13
【问题描述】:

我不断收到错误“集合已修改;枚举操作可能无法执行”。

在 winform 的设计模式下。项目运行良好,只是设计时间有问题。

这在打开和关闭项目 X 次(目前在 1 到 10+ 次之间)后消失,但总是在随机时间回来(即使没有对项目或其任何依赖项进行任何更改)。

System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource 资源) 在 System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Collections.Generic.List1.Enumerator.MoveNext() 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblySpecFound(List1 assemblies, String assemblyFullName) at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddDependencies(Assembly a, String fileName) at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly() at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblySpecFound(List1 程序集,字符串 assemblyFullName) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencies(项目项目) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly() 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(字符串全名,字符串类型名,布尔忽略类型,布尔allowPrivate,程序集和程序集,字符串描述) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(字符串全名,字符串类型名,布尔忽略类型案例,程序集和程序集,字符串描述) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName 程序集名称、字符串类型名称、布尔忽略类型案例、程序集和程序集) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName 程序集名称,字符串类型名称,布尔忽略大小写,程序集和程序集,ReferenceType refType) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName 程序集名称,字符串类型名称,布尔忽略类型案例,程序集和程序集) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName 名称,布尔 throwOnError) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName 名称) 在 Microsoft.VisualStudio.Design.VSDynamicTypeService.OnAssemblyResolve(对象发件人,ResolveEventArgs e) 在 System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly 程序集,字符串 assemblyFullName) 在 System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly 程序集,字符串名称,布尔 throwOnError,布尔 ignoreCase,ObjectHandleOnStack 类型) 在 System.Reflection.RuntimeAssembly.GetType(字符串名称,布尔 throwOnError,布尔 ignoreCase) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(字符串全名,字符串类型名,布尔忽略类型,布尔allowPrivate,程序集和程序集,字符串描述) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(字符串全名,字符串类型名,布尔忽略类型案例,程序集和程序集,字符串描述) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName 程序集名称、字符串类型名称、布尔忽略类型案例、程序集和程序集) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName 程序集名称,字符串类型名称,布尔忽略大小写,程序集和程序集,ReferenceType refType) 在 Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(字符串 typeName,布尔 throwOnError,布尔 ignoreCase,ReferenceType refType) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(字符串名称,布尔 throwOnError,布尔 ignoreCase) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(字符串名称) 在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetRuntimeType(字符串类型名称) 在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(字符串类型名称) 在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(字符串类型名称) 在 System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(IDesignerSerializationManager 管理器,字符串名称,Dictionary2 names) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary2 名称,CodeStatementCollection 语句,字符串类名) 在 System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager 管理器,CodeTypeDeclaration 声明) 在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager 管理器) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager 序列化管理器) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

【问题讨论】:

    标签: winforms visual-studio-2010 visual-studio visual-studio-2012


    【解决方案1】:

    我认为这是 Visual Studio 2012 Update 4 中修复的错误:

    Windows 窗体

    • 您可能会在 Windows 窗体设计器中收到以下错误消息:

    • 集合已修改;枚举操作可能无法执行

    转到Download Visual Studio 2012 Update 4 获取更新。

    【讨论】:

    • 谢谢,我以为我有最新的补丁。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-02
    • 1970-01-01
    • 2013-04-12
    • 1970-01-01
    • 2012-10-08
    相关资源
    最近更新 更多