Visual Studio 2015 Broken Razor Intellisense
VS2015 인스턴스 를 설치 한 후 복구 한 후에도 여전히 MVC보기에서 인텔리전스 (서버 쪽)를 사용할 수 없습니다. 세션에서 .cshtml 파일을 처음 열면 Activitylog 파일로 보내지 자마자 메시지 프롬프트가 표시 됩니다. ActivityLog.xml (짧은 버전)에서 검색된 오류 메시지 :
System.ArgumentException : 항목이 이미 추가되었습니다. 사전에 키 : 'RazorSupportedRuntimeVersion'
정식 버전은 다음과 같습니다.
System.Reflection.TargetInvocationException : 호출 대상에 의해 예외가 발생했습니다. ---> System.ArgumentException : 항목이 이미 추가되었습니다. 사전에 키 : 'RazorSupportedRuntimeVersion'키 추가 : System.Collections.Hashtable.Insert (Object 키, Object nvalue, Boolean add)의 'RazorSupportedRuntimeVersion'System.Collections.Hashtable.Add (Object key, Object value) System.Collections.Specialized.HybridDictionary.Add Microsoft.VisualStudio.Utilities.PropertyCollection.AddProperty (개체 키, 개체 속성)의 Microsoft.VisualStudio.Utilities.PropertyCollection. (Object 키, 개체 값), Microsoft.VisualStudio.Html.Package.Razor.RazorVersionDetector.Microsoft.Html.Editor.ContainedLanguage.Razor.Def.IRazorVersionDetector Microsoft.Html.Editor.ContainedLanguage.Razor.RazorUtility.TryGetRazorVersion (ITextBuffer textBuffer, Version & razorVersion)의 .GetVersion (ITextBuffer textBuffer) Microsoft.Html.Editor.ContainedLanguage.Razor.RazorErrorTagger..ctor (ITextBuffer textBuffer) System.RuntimeMethodHandle에서 내부 예외 스택 추적 ---System.Reflection.RuntimeConstructorInfo.Invoke (BindingFlags invokeAttr, 바인더 바인더, Object [] 매개 변수, CultureInfo culture)의 InvokeMethod (Object 대상, Object [] 인수, Signature sig, 부울 생성자) System.Activator.CreateInstance (Type type, BindingFlags bindingAttr, Binder binder, Object [] args, CultureInfo culture, Object [] activationAttributes)의 System.Activator.CreateInstance (바인더, Object [] args, CultureInfo culture, Object [] activationAttributes, StackCrawlMark & stackMark) Microsoft.Html.Editor.ContainedLanguage.Common.ContainedCodeErrorTaggerProvider'1의 Activator.CreateInstance (Type type, Object [] args) Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator'1의 CreateTagger [T] (ITextBuffer textBuffer)입니다. GatherTaggers (ITextBuffer textBuffer)GatherTaggers (ITextBuffer textBuffer)
도움이된다면 글꼴 색상 사용자 정의가 있으며 Web Essentials, Bundler & Minifier 및 Web Compiler 확장이 설치되어 있습니다.
업데이트 : 기존 웹 응용 프로그램을 열거 나 처음부터 새로운 웹 응용 프로그램을 만들 때 발생합니다. 동일한 컴퓨터에 VS2013 인스턴스가 설치되어 실행 중입니다.
위 그림에서 알 수 있듯이 전혀 지능이 없으며 코드 채색이 전혀 없습니다.
그것을 고치는 방법에 대한 단서가 있습니까? 미리 감사드립니다.
사용자 데이터를 재설정 하여이 문제를 해결했습니다.
devenv.exe /resetuserdata
내 프로젝트에서 ".vs"폴더를 제거하십시오.
경고 : 모든 사용자 설정이 재설정됩니다. 기본적으로 공장 기본값으로 재설정하는 것과 같습니다. 사용자 정의 키보드 단축키, 설치 한 확장 프로그램 등이 손실됩니다.
이것은 나에게도 반복적이며 확장 업데이트와 관련이있는 것으로 보이지만 아직 구체적인 것을 비난 할 수는 없습니다. 내가 발견 할 수 있었던 것은 덜 침해적인 해결책입니다.
필자의 경우이 디렉토리의 내용을 삭제하면 IDE가 복구 할 수 있습니다.
%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
편집 : 방금 이것도 편리 할 수 있습니다 -MEF 구성 요소 캐시 지우기 (VSIX 갤러리 열기)
FWIW, 나는 두 개의 다른 컴퓨터에서 VS 2015 Enterprise 에서이 문제를 겪었습니다. 한 컴퓨터에서 사용자 데이터를 재설정하면 문제가 해결되었습니다 (한동안). 다른 컴퓨터에서 VS를 완전히 제거했다가 다시 설치해야했지만 문제가 잠시 사라졌습니다. 두 컴퓨터에서 확장을 설치 한 후 (Web Essentials를 설치할 때, Git Diff Margin을 설치할 때 한 번) 문제가 다시 발생했습니다.
MSDN 기술 지원 사례를 태웠는데 그 대답은 ... 네, 버그입니다. MS는 그것에 대해 알고 있습니다.
특히 실행 가능한 대답은 아니지만 그럼에도 불구하고 대답은 ...
편집 : 그리고 문제를 해결하기 위해이 "답변"을 게시 한 후 문제가 몇 번 더 발생했습니다. 가장 최근에는 NuGet Package Manager에 대한 업데이트를 설치했으며 VS를 다시 시작하면이 문제가 발생하기 시작했습니다. 나는 달렸 devenv.exe /resetuserdata
지만 도움이되지 않았다. 여전히 망가졌습니다. 그래서 다시 시도하고 (ran devenv.exe /resetuserdata
), bada bing bada boom, 문제는 사라졌습니다 (현재). 도덕적 의미는 "처음에 성공하지 못하면 ..."
가지고 듀오가 발생했을 수 있습니다 Resharper
.
향후 버전에서는 수정 될 것이지만 현재 (버전 10.0.2)에서는 고장났습니다. Resharper는 Visual Studio의 인텔리전스를 재정의하므로 작동하지 않습니다. 또한 왜 실행 devenv.exe /ResetUserData
이 제거되어서 수정 하는지 설명 합니다 Resharper
.
메뉴를 통해 인텔리전스 전원을 수동으로 VS로 되돌립니다.
ReSharper
>> Enviroment
>> IntelliSense
>> 다음을 채 웁니다.
나는 같은 문제를 만났지만 그 원인은 다른 대답과 다릅니다.
Visual Studio 업데이트로 2015 년 9 월 TypeScript 업데이트가 의심되어 Visual Studio 2015의 Web Developer Tools 구성 요소가 제거되었습니다. Intellisense가 작동하지 않습니다.
설치 프로그램 옵션에 Web Developer Tools를 다시 설치하고 설치 후 ComponentModelCache를 삭제했습니다. 그것은 나를 위해 일했다.
이것은 나를 위해 바로 고쳤습니다.
Visual Studio에서 :
도구-> 옵션-> 텍스트 편집기-> 모든 언어-> 일반을 클릭하십시오. "자동 목록 구성원"을 선택 취소하십시오. "매개 변수 정보"를 선택 취소하십시오. "자동 목록 구성원"을 체크하십시오 (예, 방금 체크하지 않은 구성원) "매개 변수 정보"를 다시 확인하십시오. 방금 선택을 취소 한 것) 확인을 클릭합니다
내 2 센트를 추가합니다. 이전 솔루션 중 어느 것도 나를 위해 일한 적이 없으며이 링크를 찾았습니다.
http://www.c-sharpcorner.com/blogs/how-to-resolve-intellisense-issue-in-visual-studio1
특히 이것은
해결책 4 :
다음으로 다음 위치에서 설정을 재설정하십시오.
도구-> 가져 오기 및 내보내기 설정-> 모든 설정을 재설정합니다.
거기에서 Visual C #을 선택합니다
/ResetUserData
솔루션은 당신의 최선의 방법이지만, 나는 또한이의 가능한 원인을 찾을 수 있다고 생각 ...
현재 Umbraco를 사용하여 BackOffice에서 매크로 부분을 만듭니다. 이 파일이 생성되면 모든 파일 숨기기 / 표시 버튼을 클릭하여 솔루션에 매크로 부분을 표시하고 Razor Syntax Highlighting이 작동하지 않는 것 같습니다. 내 생각에 VS에 직접 생성되지 않은 솔루션에 새 파일이 도입되었습니다. 이 문제가 발생합니다.
솔루션에 파일을 추가 할 때도 구문 강조가 작동하지 않습니다.
때로는 VS Ide가 Intellisense를 전혀 나타내지 않습니다. 방금 해결책을 닫습니다. VS를 닫습니다. 그런 다음 다시 열면 문제가 해결됩니다.
모든 사용자 데이터를 재설정하지 않고 다른 솔루션이 있습니다.
(단, 창 레이아웃 / 도구 모음 만 해당) :
close all VS2015 instances, [eventually backup, and] delete the folder:
"[User Directory]\AppData\Roaming\Microsoft\Visual Studio\14.0"
Now, re-open VS2015: layout was reset to factory preset, but Razor syntax would work
FYI: My VS 2015 PRO installation has full install with all 3-rd parties.
I tried all possible solution that here in article, it didn't help me. What Craig Goldensoph wrote helped me partially to find solution for me.
So first I did: Uncheck all checkboxes for Text Editor-> All Languages->General Statement completion:
After Click OK- Reopen Option Dialog again: And check all for the same section:
and apply settings again. You have to Restart your Visual studio. After restart it will take a time to load , but after that it worked for me.
If none of the other options work, there is a workaround. After the entering the '.' operator press the "Ctrl + Space" keys which should force the Intellisense dialog to appear.
I was having this issue when working with .cshtml MVC razor files.
This might sound funny but just to do one thing..
Put Breakpoint on any line and then wait for 5 seconds of that do not work then go to first line and put break point there and as you put break point it will ask for break point settings. click on that settings and close that settings. Done. you intellisense is now working.
I have VS 2015 Community edition.Previously had VS 2015 Enterprise and it happened on that but after getting community i found that same happens and same solution work for both.
I found that solution by accidently during work.Also do that when project is not running.and you can remove that break point also.
You don't need to reset everything just remove all files from %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
and restart VS, it'll be fine.
I've posted this answer on another SO question, just because I want to prevent people wasting the time I've just wasted. My problem was that I'd added files to a project, but not included them. So I chosen to show all files:
then chose to include folders:
The problem only shows up when you open an MVC website as a project, and not when you open it as a website directly.
I was only able to fix this by updating the webpages version, which I mentioned in another similar question:
Razor intellisense not working in VS 2015
광산은 keester에 약간의 통증이 있었지만 효과가있는 것 같습니다. 제 경우에는 더 이상 인텔리전스를하지 않는 .aspx 파일이었습니다 (.aspx 파일 이름을 어리석게 변경 한 후 ... 배우지 못했습니다!)
- 예를 들어 모든 코드를 파일 (.aspx & .cs)에서 메모장으로 복사했습니다.
- .aspx 파일을 삭제했습니다 (모든 자식 파일이 삭제됨).
- 내 프로젝트를 저장했습니다. 이름이 같은 새 .aspx 파일을 만들었습니다.
- 메모장에서 내 코드를 복사 / 붙여 넣습니다.
- 저장했습니다.
- 다시 지능을 시험해 보았습니다. 효과가 있었다!
방법에 대해 반올림하지만 완전히 제거하는 / 제거 재설치보다 나쁘지 않습니다. 모두 행운을 빌어 요! 다행스럽게도 MS는이 기간 중 하나를 고칠 것입니다!
참고 URL : https://stackoverflow.com/questions/31581666/visual-studio-2015-broken-razor-intellisense
'programing tip' 카테고리의 다른 글
gradle로 소스 jar을 빌드하는 방법 (0) | 2020.06.20 |
---|---|
UNION [ALL]과 함께 SELECT INTO 절을 사용할 수 있습니까? (0) | 2020.06.20 |
Javascript를 사용하여 인쇄 대화 상자를 팝업하려면 어떻게해야합니까? (0) | 2020.06.19 |
write.csv 사용시 행 이름이 파일에 기록되지 않도록 방지 (0) | 2020.06.19 |
Chrome 웹 속성 네트워크 탭에서 확장 리소스를 숨길 수 있습니까? (0) | 2020.06.19 |