Programing

Visual Studio 2013 IntelliSense가 ASP.NET MVC5 컨트롤러에서 작동을 멈춤

lottogame 2020. 6. 28. 18:29
반응형

Visual Studio 2013 IntelliSense가 ASP.NET MVC5 컨트롤러에서 작동을 멈춤


Visual Studio 2013 ASP.NET MVC 5 프로젝트에서 이상한 문제가 발생했습니다. 갑자기 MVC 5 프로젝트의 Controller 클래스에서 IntelliSense가 전혀 작동하지 않습니다.

내 솔루션에 다른 클래스 라이브러리 프로젝트가 있고 IntelliSense가 해당 클래스 라이브러리 프로젝트 파일에서 작업하고 있지만 문제는 MVC 프로젝트에만 있습니다. 일반적으로 이러한 종류의 문제는 Visual Studio를 다시 시작하면 해결됩니다. Visual Studio를 다시 시작했을뿐만 아니라 컴퓨터도 다시 시작했으며 IntelliSense 문제가 전혀 해결되지 않았습니다.

IntelliSense를 다시 가져올 수있는 다른 단계가 있습니까?


Visual Studio를 닫습니다. <ProjectName> .v12.suo 파일을 삭제하십시오. 솔루션을 다시여십시오.


내 설정을 재설정 또는 이전에 내 보낸 가져 오기 설정을 작업 하고 비주얼 스튜디오를 다시 시작하면 일 : Tools > Import and Export Settings... > Reset all settings.

편집 : 이것은 놀랍게도 종종 VS Express에서, 때로는 VS Professional에서 나에게 계속 발생합니다. 내가 Pro에서 발견 한 한 가지는 예기치 않은 종료 후 (IT가 한밤중에 강제로 재부팅 할 때) 발생한 것입니다. 따라서 Visual Studio가 올바르게 닫히지 않는 것과 관련이있을 수 있습니다. 위에서 설명한 기술은 매번 작동했습니다.


도구> 옵션> 텍스트 편집기> C #> 일반

"자동 목록 구성원"이 선택되어 있는지 확인하십시오


문제를 해결하는 한 가지 방법을 찾았습니다. 즉, 1.-> 솔루션에서 ASP.NET MVC 프로젝트를 제거하고, 2.-> 그런 다음 MVC 프로젝트를 솔루션에 다시 추가하십시오.

이 단계를 수행하면 Intellisense를 다시 얻을 수 있습니다. 그러나 다음에 솔루션 파일을 두 번 클릭하여 솔루션을 열면 인텔리전스가 다시 작동하지 않기 때문에이 솔루션에 만족하지 않습니다. 나는 그것이 왜 그렇게 행동하는지 진짜 이유를 알고 싶습니다.

편집하다:

마지막으로 문제가 발생한 타사 Visual Studio 확장 프로그램이라는 것을 알았습니다. 그 확장을 찾기 위해 모든 확장을 제거한 다음 확장을 하나씩 추가하고 내 수면을 취하는 범인 확장을 찾은 곳에서 멈췄습니다. :).


솔루션에서 프로젝트를 언로드하고 MVC 프로젝트를 다시로드 할 수 있습니다.

  1. 솔루션 탐색기에서 MVC 프로젝트를 마우스 오른쪽 버튼으로 클릭-> "프로젝트 언로드"
  2. 솔루션 탐색기에서 MVC 프로젝트를 마우스 오른쪽 버튼으로 클릭하십시오-> "프로젝트 다시로드"

이 후 Intellesense는 신속하게 재 작업합니다.


  • 도구-> 옵션
  • 텍스트 편집기-> C #-> Intellisense
  • "문자를 입력 한 후 완료 목록 표시"가 선택되어 있는지 확인하십시오.

VS2013 인텔리전스 코드 완성


왜 이런 일이 발생하는지 잘 모르겠지만 발생하는 경우 Visual Studio를 다시 시작하여 Intellisense를 복구 할 수 있습니다.

네 말이 맞아, 정말 짜증나.


때로는 VS 설정의 재설정이 도움이 될 수 있습니다.

도구-> 설정 가져 오기 및 내보내기 마법사-> 모든 설정 재설정-> "아니요, 설정을 재설정하고 현재 설정을 덮어 씁니다"-> 다음> 다음> 다음

나는 그들을 SHASHAPER로 엉망으로 만들었습니다.


IntelliSense 문제를 해결하는 가장 좋은 방법은 솔루션 탐색기에서 프로젝트를 언로드하고 프로젝트를 다시로드하는 것입니다. 그 후 IntelliSense가 항상 나를 위해 일하고 있으며 책갈피, 중단 점 또는 기타 설정을 잃지 않습니다.


빌드가 실패하면 Intellisense가 중단되는 것으로 나타났습니다. 빌드 오류를 수정하고 프로젝트를 다시 빌드하면 Intellisense가 특정 Razor 파일을 다시로드 한 후 작동합니다.


제 경우에는 재시작이 작동하지 않았습니다.

그래서 나는 다음과 같은 이상한 단계를 수행했습니다.

  1. 솔루션을 닫았습니다
  2. 다른 솔루션을 열었습니다
  3. intellisense가이 다른 솔루션에서 작동했음을 확인했습니다.
  4. 다른 솔루션을 닫았습니다
  5. 마지막으로 첫 번째 솔루션을 다시 열었습니다.

그리고 지능이 다시 작동했습니다.


일반적으로 버퍼에 오류가있을 때 발생합니다. 예를 들어, Windows 양식을 닫았다가 다시 열면 로컬 캐시 오류가 대부분 지워져 메모리에 다시로드됩니다. 위의 많은 솔루션이 작동하지만 때로는 항목과 디자이너를 닫고 항목을 다시 여는 것처럼 간단합니다.

또한 강제로 재설정을 시도 할 수 있습니다

Ctrl + K, Ctrl + I는 빠른 정보를 표시합니다. Ctrl + Shift + Space는 매개 변수 정보를 표시합니다.


작동하지 않는 많은 것들을 시도했습니다. 결국 코드를 ​​클립 보드로 자르고 컨트롤러를 다시 만들고 코드를 붙여 넣었습니다. 문제가 해결되었습니다!


텍스트 편집기에서 Intellisense와 동일한 문제가 있습니다.

난 그냥 close다시 시작하지 않고 클래스를 인텔리을 제공하고 다시되지 example.cs 파일 Visual Studio나를 위해 작동합니다.

참고 : 솔루션 탐색기의 모든 .CS 파일에 동일한 문제가 없습니다.


VS 2013을 사용하고 동일한 문제가 발생했습니다. 내 솔루션은 마지막 버전으로 VS를 업데이트했습니다. 내 경우에는 업데이트 4입니다. 프로젝트의 참조는 컴퓨터 (OS)의 GAC 어셈블리와 일치해야합니다. Intellisense는 프로젝트가 아닌 VS에서 나옵니다.

나는 그것이 누군가에게 도움이되기를 바랍니다.


... Yet another answer - but this was the cause of my pain: I'd installed Developer Assistant which had been working nicely but suddenly stopped providing suggestions. To get it working again:

options -> developer assistant -> Intellisense -> Default Visual Studio Intellisense

Took me 5 hours to find that :(

HTH.


Tools->Options->Text Editor->C# (or All Languages)->General

check the check box for enable Auto List Members and Parameter Information in right hand side pane.

If its not selected,select it.


Save everything and restart Visual Studio!


I get this exact same thing every time I work with one particular MVC5 project. Restarting VS2013 does not work. Deleting suo files does not work. Resetting all tools settings does not work. The only thing that ever works is removing the project from the solution and adding it again. Seeing as I have to do this every day is is really quite annoying. Especially when I have it set to reopen the last files I had open, I then need to track down the ones I was working on and re-open them instead of the popping up automagically..


I'm using VS 2013 with MVC 5. The solution for me was to add the following to Web.config:

<compilation debug="true" targetFramework="4.5.1">
  <assemblies>
    <add assembly="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </assemblies>
</compilation>

Rushonerok's solution works great for me.
For anyone who doesn't know: <ProjectName>.v12.suo is a hidden file in project root folder. You must set on "Show hidden files" in your file browser to see it.


So far some these solutions have not worked for me.

I have the following Workaround

Simply declare the type you want to use explicitly in a new variable and use that instead of Model.

@model MyModel
MyModel mymodel = Model;

@mymodel.MyIntelisenseIsWorkingAgain

To solve this I closed Visual Studio Express 2013 and I reopened the Solution but double clicking on its .sln file directly from the file system. Opening it from the Start Page had my controllers intellisense broken.


Closing and opening the Visual Studio Solution worked for me.


Sometimes you close it by mistake. Try ctrl+space for windows or cmd+space for mac to turn it on.


I know I'm a bit late, but adding this to my App.config file did the trick!

<system.web>
    <compilation>
        <assemblies>
            <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        </assemblies>
    </compilation>
</system.web>

참고URL : https://stackoverflow.com/questions/21471887/visual-studio-2013-intellisense-stops-working-for-asp-net-mvc5-controllers

반응형