Development Tip

VS 2012 RC에서 사용자 유형 C # 구문 강조 표시가 다시 작동하도록하려면 어떻게해야합니까?

yourdevel 2020. 10. 15. 21:53
반응형

VS 2012 RC에서 사용자 유형 C # 구문 강조 표시가 다시 작동하도록하려면 어떻게해야합니까?


어떻게 든 C # 코드에 대한 구문 강조 표시의 일부가 VS 2012 IDE에서 사라졌습니다. 제거, 재부팅 및 재설치는 아무 작업도 수행하지 않으며 옵션 대화 상자에서 색상을 재설정하지도 않습니다.

다음은 일반적으로 색상이없는 기본 (검정)으로 모두 나타나는 항목의 몇 가지 예입니다.

  • 속성
  • 시스템 클래스
  • 내 수업

여전히 색상이있는 키워드는 다음과 같습니다.

  • 사용
  • 공공의
  • var
  • ...에 대한

다른 사람이 이것을 경험하고 고칠 수 있었습니까?


여기에 간단한 해결책이 있습니다. devenvis (2012 RC의 경우) 디렉토리로 이동하여 devenv.exe /setup. 문제가 해결됩니다.

devenv.exe일반적으로 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.

편집 : Visual Studio 명령 프롬프트 (시작> Microsoft Visual Studio> 도구> Visual Studio 명령 프롬프트)에서이 작업을 수행하고 / 또는 명령 프롬프트에 관리자 권한이 있는지 확인하는 것이 좋습니다.

다른 사용자를위한 참고 사항 : 2008, 2010, 11 베타 등을 포함한 다른 여러 버전의 Visual Studio에서 작동 할 가능성이 매우 높습니다.


내 문제는 "DateTime"유형이 다른 클래스 이름처럼 하늘색으로 표시되지 않는 것으로 제한되었습니다. VS 테마 사이를 앞뒤로 전환하여 문제를 해결했습니다. 우연히 발견되었습니다. 설정을 재설정하거나 설치를 복구하는 것보다 훨씬 빠릅니다.

VS 메뉴 도구-> 색상 테마 변경


이것은 나를 위해 일한 것입니다.

1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
2 - open vs console as administrator, and run:
      devenv.exe /setup
      devenv.exe /ResetSettings

그러면 모든 환경 설정이 재설정됩니다.


위의 방법 중 어느 것도 작동하지 않으면이 레지스트리 키 아래에있는 모든 GUID 이름이 지정된 폴더를 삭제합니다 (Visual Studio 인스턴스가 닫혀 있는지 확인).

Visual Studio 2012를 사용하는 경우 : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors

Visual Studio 2013을 사용하는 경우 : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors

Visual Studio 2015를 사용하는 경우 : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\FontAndColors

Visual Studio를 다시 시작하면 구성 할 몇 가지 다양한 "사용자 유형"이 표시됩니다. 그런 다음 백업 한 글꼴 및 색상을 가져올 수 있으며 모든 것이 잘 될 것입니다. 이것은 VS의 이전 및 향후 버전에서도 작동 할 수 있지만 테스트하지는 않았습니다.

고지 사항 : 레지스트리를 조정하기 전에 현재 글꼴 및 색상 설정을 내보내거나 백업해야합니다. 나는 당신이 당신의 구성을 잃어버린 것에 대해 책임을 질 수 없습니다. :)


여전히이 문제가있는 경우 ResetSettings를 시도하십시오 (저에게 도움이 됨).

참고 : Visual Studio 2012 설정이 재설정됩니다. :)

1) 닫기 vs.

2) cmd를 엽니 다 (관리자 권한).

3) devnev.exe 폴더 (예 : "C : \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE")로 이동합니다.

4) "devnev.exe / ResetSettings"를 입력합니다.

5) 아름다운 색상을 열고보기


문제의 원인을 찾았습니다. " Productivity Power Tools 2012 "가 설치되어있는 경우

당신은 가야한다 도구 > - 옵션 -> 생산성 전동 공구를 하고 "끄 색상 화 매개 변수 도움말 "옵션을 선택합니다.

이것은 구문 강조 문제를 해결했습니다.


누구든지 내가 한 것처럼 Visual Studio 2013 에서 동일한 문제를 겪는 경우 저에게 효과가 있었던 유일한 해결책은 먼저 VS2013을 닫은 다음 다음 레지스트리 키를 삭제하는 것입니다.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors

VS2013을 다시 연 후 유형에 대한 구문 강조 표시가 복원되었습니다.

레지스트리 키를 삭제하기 전에 도구> 옵션의 글꼴 및 색상 섹션에있는 "사용자 유형 ..."설정이 모두 누락 된 것을 확인했습니다. 레지스트리 키를 삭제하면 복원되었습니다. 그들은 내가 찾고 있던 구문 강조 색상을 제공하는 기본값을 얻었습니다.

이것은 나를 위해 일한 유일한 솔루션이었습니다. 테마 전환, 개인 설정을 기본값으로 재설정, 다양한 명령 줄 스위치와 함께 devenv.exe를 실행하여 Visual Studio를 설정 / 재설정 할 수 없었습니다.

또한 Connect 사이트에서 Microsoft와 함께 다음 버그 보고서를 작성했습니다.

http://connect.microsoft.com/VisualStudio/feedback/details/810985/incorrect-syntax-highlighting-for-c-types .


For me "Productivity Power Tools 2012" was the cause. Nothing suggested here helped. After removing the Power Tools the colors came back.


I did all the things listed here and still nothing (VS2013 Update 3). I tried /setup, /resetsettings, deleting the stuff in AppData, deleting the registry keys. Still, User Types wouldn't be highlighted even in the default color scheme.

What helped in the end was opening the Fonts and Colors dialog, selecting Identifier, and making it Bold. Then removing the Bold. Instant fixage!


I had the same issue....just uninstalling and re-installing alone did not correct the problem. After I un-installed, deleted all remnants of VS 2012 in program files, removed all related registry keys, and deleted the VS 2012 folder from My Documents, then re-installed, user types showed up in the display items in fonts and colors and everything went back to normal. My guess is that it was an issue with one or more of the registry keys but I can't be sure of that.


exit devenv

go to below path hkey_current_user\software\microsoft\visualstudio!

remove 9.0 , 10.0 , 10.0_config (i mean to say all other folders except 11.0 and 11.0_config)

Now start devenv and see the magical colors get back normal


1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0 2 - open vs console as administrator, and run: devenv.exe /setup devenv.exe /ResetSettings1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0 2 - open vs console as administrator, and run: devenv.exe /setup devenv.exe /ResetSettings

This is what helped me...


  1. delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
  2. open vs console as administrator, and run:

    devenv.exe /setup
    devenv.exe /ResetSettings
    

This solution worked for me. Thanks alot Gaz Winter


If you've installed the preview of Roslyn, unintstall it. This worked for me.


After trying several of the solutions listed here, I eventually found that my issue was caused by a very large (488000+ characters) string variable. Highlighting was working up to that line, but not after it. Once I reduced the length of the string, highlighting in the rest of the file resumed working normally.


I already had VS 2012 Pro installed on my machine. I then installed VS 2013 Pro and started facing this color issue. I then deleted the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors key and opened VS 2013. This approach solved my issue and the colors were back.


If the windows desktop is configured with a high contrast theme the syntax coloring seems to disappear completely from Visual Studio. If this is the case, select a normal windows theme and set a solid background color (if you don't want a background pictures) to restore syntax coloring in VS.


Problem : Class name and Syntax showing in black color

Solutation:

Step 1: Remove Key :
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors

Step 2: Remove folder :
C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\12.0

Step 3: Open command prompt (admin mode) and run below command line :
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>devenv.exe /setup
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>devenv.exe /ResetSettings


It work for download this "Productivity Power Tools 2012" and install, after install this tool get this steps go to Tools -> Options -> Productivity Power Tools and turn off the "Colorized Parameter Help" option.

This fixed the keyword as syntax ActionResult is not set for default black color and highlight problem resolved.

참고URL : https://stackoverflow.com/questions/10970305/how-can-i-get-user-type-c-sharp-syntax-highlighting-working-again-in-vs-2012-rc

반응형