我现在变得有点疯狂了.我的公司从VS2008切换到VS2012,现在我找不到任何选项来为结构启用代码突出显示.
在VS2008中有类似的东西
public Color Foreground {get;set;}
关键字Color将突出显示,因为它是一个众所周知的定义结构.
在VS2012中,突出显示功能不再适用于结构体.
有没有人也注意到了?有人有解决方案吗?我经历了所有的颜色选项并尝试了所有的东西,但我无法获得良好的旧struct突出颜色.
自从我们的公司内部winforms应用程序从VS2008转换到VS2012项目后,我在使用winforms设计器时遇到了问题.
有时设计器会陷入错误状态,并显示以下错误消息:
"集合已被修改;枚举操作可能无法执行." 调用堆栈说:
Instances of this error (1)
1. Hide Call Stack
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Collections.Generic.List`1.Enumerator.MoveNext()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblySpecFound(List`1 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.SearchByShortName(String partialName, String fullName, AssemblyEntry[] entries, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchNormalEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, Boolean fastSearch)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreCase, Assembly& assembly, ReferenceType refType)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName name, Boolean throwOnError)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName name) …Run Code Online (Sandbox Code Playgroud)