English 中文(简体)
2013年视觉演播室 IntelliSense停止为 ASP.NET MVC5 主计长工作
原标题:Visual Studio 2013 IntelliSense stops working for ASP.NET MVC5 Controllers
I am facing a weird problem in my Visual Studio 2013 ASP.NET MVC 5 project. All of a sudden, the IntelliSense in the Controller classes of the MVC 5 project are not working at all. I have other class library projects in my solution and IntelliSense is working in those class library project files, but the problem is only within the MVC project. Usually these kinds of problems are solved by restarting Visual Studio: not only did I restart Visual Studio, but I also restarted my computer, and the IntelliSense problem is not getting fixed at all. Are there any other steps that can get me IntelliSense back?
最佳回答
I have found one way to solve the problem. That is, 1. -> Remove the ASP.NET MVC Project from Solution, 2. -> Then, add the MVC Project back to the Solution. By doing these steps, I can get the Intellisense again. But, I am not happy with this solution though, because, next time when I double click the Solution file to open the solution, I see the intellisense is not working again. I would like to know the real reason why it is behaving like that. EDIT: Finally, I figured out that it was a 3rd party visual studio extension which was causing the problem. In order to find out that extension, I removed all extensions and then, added the extensions one by one and stopped where I found the culprit extension that was taking my sleep away :).
问题回答
Close Visual Studio. Delete the .v12.suo file. Reopen solution.
Resetting my settings or importing previously exported, working settings, and restarting Visual Studio worked: Tools > Import and Export Settings... > Reset all settings. EDIT: This keeps happening to me, surprisingly often in VS Express, and occasionally in VS Professional. One thing I noticed in Pro, is that it has happened after unexpected shut downs (when IT forces a reboot in the middle of the night). So it may be related to Visual Studio not closing correctly. The technique described above has worked every time.
Tools > Options > Text Editor > C# > General Make sure that "Auto List Members" is checked
You can unload project and reload the MVC project from solution Right Click on MVC project in solution explorer -> "Unload Project" Right Click on MVC project in solution explorer -> "Reload Project" After this the Intellesense rework quickly.
Tools -> Options Text Editor -> C# -> Intellisense Ensure "Show completion list after a character is typed" is checked VS2013 intellisense code completion
I m not sure why it occurs, but when it happens to me I can recover Intellisense by simply restarting Visual Studio. You re right, it s really annoying.
Sometimes RESET of VS settings can help: TOOLS->Import and Export Settings Wizard->Reset all settings->checkbox "No, just reset settings, overwriting my current settings"->Next>Next>Next I had messed them with RESHARPER, and this helped.
I found that the best way to fix IntelliSense issues is to simply unload the project in the solution explorer and load the project again. After that IntelliSense is always working for me and I do not loose bookmarks, breakpoints or any other settings.
I have found that if the build fails then the Intellisense seems to break. After fixing my build errors and rebuilding the project the Intellisense will work after reloading the particular Razor file.
In my case, restart didn t work. So I did the following weird steps : Closed the solution Opened another solution Verified that intellisense worked in this other solution. Closed the other solution Finally, reopened the first solution. And the intellisense worked again.
Usually this happens when the buffers have an error in them. Most of the time the local cache error is cleared when you close a, windows form, for example and reopen therefore reloading it into memory. Many of the solutions above work but sometimes it as as simple as closing the item and designer and reopening the item. Additionally you can try to force a reset by Ctrl+K, Ctrl+I shows quick info Ctrl+Shift+Space shows you param info
I tried lots of things which didn t work. In the end, I cut code to clipboard, recreated the controller and pasted code in. Problem solved!
I too have the same issue with Intellisense in my Text editor. i just close example.cs file which is not providing Intellisense and reopen that class without restart Visual Studio it works for me. Note : i don t have the same issue with all the .CS file in Solution Explorer
I use VS 2013 and I had the same problem. My solution was update VS to last version. I my case Update 4. Simply reference in project must match with assembly in GAC on computer (OS). Intellisense come from VS not from project. I hope that will handy for some one.
... 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:
Rushonerok s solution works great for me. For anyone who doesn t know: .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!
Apply the following fixes to solve the issue of IntelliSense in Visual Studio: You can find the full solution here close and reopen the affected file close all opened documents and reopen the affected file Refresh Solution Explorer by clicking the Refresh icon Unload and reload affected project(s) Close and reopen Solution Restart Visual Studio After closing Visual Studio, delete the .vs folder in the Solution and Project directories. Upon reopening the solution, Visual Studio will rebuild the IntelliSense and Profile cache. Go to the Tools > Options > IntelliCode > General: select Use Defaults Go to the Tools > Options > IntelliCode > General: Uncheck and Recheck C# Suggestions Go to Tools > Options > Text Editor > General: Under Display on the right, ensure Show error squiggles, is checked. Go to Tools > Options > Text editor > All Languages: Under Statement Completion, uncheck and recheck the options “Auto list members” and “Parameter information”. Go to Tools > Options > Text editor > click the affected Language e.g C#, CSS etc.: Under Statement Completion, uncheck and recheck the options “Auto list members” and “Parameter information”. Go to Tools > Options > Text Editor > C# > IntelliSense: Uncheck the experimental options (beta options), these might be broken at the time Go to Tools > Import and Export settings > Reset all settings (to Reset VS Settings) Re-install IntelliCode in Visual Studio. Launch VS Installer. Click Modify. Under Individual Components, Search and uncheck IntelliCode (uninstall). Click Modify. Repeat the steps to re-install IntelliCode. Extra Considerations (if Applicable): For C++: Tools > Options > Text Editor > C/C++ > Advanced > Disable database > False For Python:Click the "Python X.X" button (bottom left of the status bar). Toggle different values If files were included/pasted in the project, toggle their Build Action Property (e.g set Content to Compile) Delete Files in the from the Folder: %AppData%MicrosoftVisualStudio14.0ReflectedSchemas Tweak ReSharper (if installed): Disable & re-enable the ReSharper. Set IntelliSense to Visual Studio under ReSharper Be careful with the copied code and files, some elements may not be initialized properly Extensions: If a 3rd party extension is causing the trouble, disable it




相关问题
Intellisense not showing anything I write

I am using Visual C# 2008 express. I m also running Windows 7. I created a simple form, but Intellisense doesn t show anything I wrote. I write: private RadioButton rbtn_sortLocation; And then when ...

Intellisense not working

Intellisense is not working correctly for new user Controls. Any class in the same namespace as my new class is not visible in intellisense. It compiles without any problem. I m using VS 2008.

Shortlisting Intellisense

Does anyone know if there s a way in VS 2008 to shortlist the Intellisense to show only, say, events or properties? Or is there possibly a plug-in for this? I use Intellisense over going to the ...

Intellisense for C# User Control in VB.NET project

I have created a C# user control which I want to use in VB.NET .. the control works fine, but in VB.NET the Intellisense does not show any of the C# user control function descriptions (in summary xml ...

visual studio intellisense error

template <typename T> class Test { friend Test<T> & operator * (T lhs, const Test<T> & rhs) { Test<T> r(rhs); // return r *= lhs; ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

热门标签