小编Laz*_*eek的帖子

Visual Studio 2012代码突出显示结构

我现在变得有点疯狂了.我的公司从VS2008切换到VS2012,现在我找不到任何选项来为结构启用代码突出显示.

在VS2008中有类似的东西

public Color Foreground {get;set;}

关键字Color将突出显示,因为它是一个众所周知的定义结构.

在VS2012中,突出显示功能不再适用于结构体.

有没有人也注意到了?有人有解决方案吗?我经历了所有的颜色选项并尝试了所有的东西,但我无法获得良好的旧struct突出颜色.

codehighlighter colors visual-studio-2012

26
推荐指数
2
解决办法
8731
查看次数

收集被修改; 枚举操作可能无法在VS WinForms Designer中执行

自从我们的公司内部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)

c# designer winforms

7
推荐指数
1
解决办法
5555
查看次数