I tried googling, but I couldn't find a fix.
Before, when writing:
console.writeline();, C# would automatically uppercase it to Console.WriteLine();.
Now, by mistake, I somehow deactivated that function. If I write console.writeline(), it doesn't turn it into Console.WriteLine();. Any ideas?
What your looking for is called: Intellisense
The sole goal of this feature is to allow coding to be more productive, smarter, and easier.
You can renable Intellisense by hitting CTRL + J. That will manually reactivate it. Otherwise you'll need to go to:
Tools
Options
Text Editor
Auto List Member
But one of those should address your issue. Otherwise I might suggest running a repair on Visual Studio or Restoring it back to defaults. Cause by default it is enabled and configured correctly.
A known issue can also come from third-party Add Ons that actually handle such data can cause issues with Intellisense so uninstalling such Add Ons, then defaulting Visual Studio should fix it as well.
Example:
Resharp
Visual Assist X
Just Code
Etc.
Basically the ones that handle code completion, quick coding features.
Here is an article from Microsoft Developer Network.
Hopefully that helps.
Related
Working on a project I made a class with properties and when I tried to auto-generate a class constructor I got an error saying something on lines of "auto generation of class constructor failed... and will be disabled" and ever sense then the "generate constructor" option has been taken off the Refactor menu and on top of that I don't get syntax error highlighting anymore and intellisense doesn't seem to be working proper or at all.
I tried using going into Tools > Options > Text Editor > various fields including "C#" and "general") and I don't see anything obviously wrong. I also tried to use Visual Studio Installer to try to repair and that didn't do anything. I am completely out of ideas and I can't find anything that is remotely close to my case. TIA
I can't add this reply as a comment as I don't have 50 reputation.
I created a .Net 6.0 C# console project in Visual Studio 2022, add a class, and add two private fields. Selecting these two fields, press Alt+Enter to quickly generate the constructor. I did not encounter your issue.
Please try:
Go to Visual Studio Installer, click Modify, uncheck IntelliCode in Individual components, then click Modify button to save the change, wait for the installation to complete, and then reinstall IntelliCode.
In Visual Studio, go to Tools->Options->IntelliCode to check if the setting is Default.
Go to Tools menu, and select Options. Under Intellicode select General. Just uncheck “C# Suggestions”. Then restart Visual Studio and check that intellisence and syntax errors are appearing.
Note, I was not able to figure out what this option does, as the C# code suggestions seemed to continue to work as expected.
After searching for a very very long time, I still haven't found an answer. Basically anytime anything is done with tabs in Visual Studio in C#, things go very badly (see attached gifs, note that the two initial tabs are for a namespace and class). These issues only happen in C# as far as I can tell, as I've used Visual Studio as my main IDE for C++ development and haven't had these sorts of issues. I've attached what I think are relevant settings screenshots.
In the attached gifs, there is only one line that the bug is shown on, but things get very nasty if I attempt to copy multiple lines...
Any help would be massively appreciated!
Not saying this is your issue ...
But starting with VS2019 an .editorconfig file can be generated and its settings saved to the project. I would check and see if one exists.
Code style rule options
I've worked with the Call Stack, Call Hierarchy, and Profiler. None of these tools gives me a simple, live "just executed function list"... in a tool Visual Studio window. I need something to look at when I click a button or link that guides me to a specific code file and line (if available).
I've found nothing of the sort. Maybe, even if PDB FULL is on, such information isn't available. I believe at this point that I'll have to write a Visual Studio 2012 Add-In or Extension to do what I need, but I run into problems there as well: For one, I can't get a function name from any viable interface unless I pause the debugger or encounter a break-point. Second, the application that I want the list for is a MVC app that runs as a DLL under "WebDev.WebServer40.exe".
I thought this would be very simple: From an extension, create a tool window and log the last executed method along with argument list.
Any ideas? Many thanks in advance!!
EDIT: For additional clarity
If you have Visual Studio Ultimate, you can use IntelliTrace. Alternatively, you can try Runtime Flow, but it can't work at the same time with VS debugger.
I'm using Visual Studio 2010 SP 1 w/ .NET 4.0 and I just upgraded to ReSharper 7. Since upgrading, when I type "this.", Resharper autocomplete always displays "No suggestions" as shown in this screenshot:
If I type ctrl+space at this point, it will come up with suggestions. I can also get suggestions if I hit escape (exit autocomplete) and then delete and re-type the dot. Either way, functioning autocomplete looks like this:
I'd really, really like autocomplete to work automatically as soon as I type "this."; can you help?
I've tried suspending and unsuspending ReSharper, restarting Visual Studio, restarting Visual Studio with ReSharper suspended, and combing the ReSharper autocomplete options. I've tried clearing the ReSharper cache, suspending ReSharper, and then restarting Visual Studio. It doesn't appear to be related to these things in a way that I can see.
I've also tried typing "this." very slowly and the behavior did not change; it doesn't appear to be a race condition. Visual Studio itself auto-completes correctly but using ReSharper autocomplete always has this problem.
Thanks in advance for any advice you can give!
Update: After restarting Visual Studio again, the autocomplete selections did appear correctly once if I typed "this." before VS / ReSharper seemed to fully load (it hiccuped while I typed and when it recovered, the autocomplete was correct). Subsequent attempts reverted to the undesirable behavior.
This is really weird. I've filed an issue with JetBrains here:
http://youtrack.jetbrains.com/issue/RSRP-330185
I'm using the same setup and it works. Your issue can be caused by:
a defective ReSharper installation
additional plugins that interfere with the Resharper IntelliSense
your computer is just a bit to slow and doesn't build the list fast enough
Edit:
I would reinstall resharper (completly remove it - don't repair) and try again.
You may disable ResharperIntellisense or limit it from Resharper->Options->Intellisense->General. I think it is beacause my computer is too slow also or a problem with VS2010.
I'm a fan of the overridden Intellisense behaviour provided by ReSharper. However, I can't seem to get it to display exceptions (anything with the /// <exception cref="SomeExcpetionName"/> xml comment). Does anyone know a way to enable this functionality?
NOTE: This is not an issue related to not including the xml comment file from a dll as it is happening for all classes (even core .Net ones). Plus, any of my own libraries, which I have ensured the XML file is included, are not displaying the exceptions in the comments either.
NOTE 2: I have tried selecting Visual Studio Intellisense instead of the ReSharper Intellisense (via Tools > Options > Text Editor > C# and turning on the Auto list members and Parameter information settings under the Statement completion section). This seemed to bring back the exceptions (after a Visual Studio restart). However, it only works when I bring up Intellisense via tab completion and not when I just bring up the tooltip for a method by hovering over the method call (this used to work... it even works properly for the first few seconds after starting up Visual Studio, but then something disables it again).
Specs:
ReSharper 5.1.3
Visual Studio 2008 Professional
Well after a reinstall that made no difference, I realized that the %appdata%\JetBrains\Resharper\v5.1\vs9.0\UserSettings.xml file was still there (which explains why a reinstall didn't work). I then did a diff on the file with another developer in my group that wasn't having the issue. I found the setting that was causing the issue.
If you wish to have your tooltips (inside of Visual Studio) show the exceptions that a method throws, you must have the following option turned off:
(In Visual Studio via the menu)
Choose ReSharper > Options > Code Inspection > Settings > Color identifiers
Uncheck the option if it is checked (disabled by default)
(In %appdata%\JetBrains\Resharper\v5.1\vs9.0\UserSettings.xml):
Find the <Highlighting Settings> section.
Delete <IdentifierHighlightingEnabled>True</IdentifierHighlightingEnabled> (You could also set it to False, but when you uncheck it via Visual Studio it actually deletes it).
Hopefully this saves some other people from the same headache. I believe this is actually a bug since using colour identifiers should have nothing to do with tool tips/Intellisense displaying possible exceptions. I'll report it to JetBrains.
UPDATE:
This issue has already been reported here.
UPDATE 2:
I was talking about this issue with one of the JetBrains support engineers and he said they'll see what they can do to address the issue in ReSharper 6. (No guarantees, but they are at least considering it).
UPDATE 3:
There is a linked case (same issue) that has been recently updated. The case has been set to a priority of show-stopper and is slated to be fixed for version 7.0.1.