I've just installed Visual Studio 2017 and began writing my ASP.NET MVC 5 web app. I've come across this issue where the indentation of code is not correct. What I noticed is that when I hit the semicolon on var priv = new Phonebase(); it will shift out of the scope that it belongs to.
I've played around with indentation settings for C#, but I couldn't remedy the issue. I've tried smart indentation and block indentation. Does anyone know how I can get Visual Studio to ident lines of code properly?
I found a .editorconfig file in the root of my c drive (c:\.editorconfig). When I deleted this file, this issue went away for me.
See this page for more information and fixes with .editorconfig
Related
Visual Studio Intellisense is bugging out and only works on my current startup project.
I'm in the process of building a multi-project solution and as of earlier today Visual Studio decided that Intellisense would stop colour coding and providing information about code that I hover over with my mouse.
this is happening in all files within the solution apart from the single one in my current Startup Project.
I'm unsure whether the fact that that file is inside the startup project is important or not or what at all caused the bug to begin the first place.
I've been searching around for a while and tried just about every 'solution' that has come up.
I've changed the relevant settings off and on again.
I've deleted the dynamic .suo file in the hidden .vs folder.
I've reopened the files, visual studio, updated, made sure intellisense wasn't doing something in the background.
Apparently this bug can be caused by a corrupt .ncb file that lives in the solution directories, but I've failed to locate a file with that extension anywhere.
I'm also not using any extensions or such that mess with Intellisense's operation.
Are there any other possible things to try (hopefully not reinstalling) or just continue writing code in black and white?
Intellisense working:
Intellisense not working:
Maybe you can check your intellisense setting in Tools > Options > Text Editor > C/C++:
This is a document about intellisense in C++. Hope it can help you.
If it doesn't work you can try to Reset all setting in Tools > Import and export settings. Or try to repair visual studio in visual studio installer.
If the above methods don't work, maybe you can only try to reinstalle visual studio.
I remember if I typed Ctrl + , in VS 2017 I could navigate to almost everything that had the typed characters, But in VS 2019 it searches only files.
Here is what 2019 looks like
But in 2017 it suggest the UserController file because it contains that method!
How can I have that feature back?
The new Visual Studio 2019 header search box, seen at the top of the screen, is designed to find anything in Visual Studio — including menu items, settings,tool windows and more. The tool uses fuzzy search that return the correct information even if you make a typo.
As stated in this blog post:
It turned out the issue was related to NuGet; what I needed to do was
delete the contents of the packages folder. For completeness's sake,
here's the steps to do what I did.
Close all instances of Visual Studio 2019. Delete the contents of the
packages folder at the root of your solution on your local machine.
Open Visual Studio 2019 again. This final solution worked for me. I
am including the potential solutions in this post in the hopes that
one of them (actual or potential) works for you, dear reader. Let me
know if you have any other solutions in the comments!
Deleting local nuget packages worked for me.
It's remarkable how much one comes to rely on the red squigglies once they're gone.
I have 1 c++ solution in Visual Studio 2013 where the red squigglies will not show up. The rest of Intellisense works, except for the error checking. I have tried:
Resetting all settings in Visual Studio
Uninstalling and reinstalling Visual Studio
Deleting the dev folder and getting latest from TFS
Deleting all *.sdf files in the dev folder.
This problem only appears in 1 solution, though. I can create a new VC++ solution, and those magical red squigglies show up where they should.
Also, I'm not sure if this is related or not, but I globally lost variable highlighting in the enhanced scroll bar. In Visual Studio 2013, if you focus the cursor over a variable, you will see little highlights appear in the scroll bar, indicating where the variable is used. That feature no longer works across the board. Edits (yellow), Breakpoints (red), and saves(green) work, but not variable highlighting.
I have a problem with syntax highlighting in visual studio 2012 and 2013 preview with C++. I've had this problem since I installed both a few days ago (tried 2013 after I saw the problem in 2012).
As you can see from below, the colours are completely messed up in the text; some keywords such as int aren't properly highlighted, the grey return value is completely broken on various texts, the class colours have merged with various texts etc.
I've done the usual stuff found from google but had zero success, such as:
Reset intellisence from %appdata%
Reset user settings via command prompt or from Tools -> Import & Export settings
Turned off hardware acceleration in Visual Studio options.
This does not happen at all in Visual Studio 2010 fortunately, so I've kept that on my machine in the mean time. I did install 2012 and 2013 while 2010 was still present on my machine, but during install, i did not select the options to import 2010 settings, so "technically" they should have been clean IDE installs. The only other thing I've noticed is; when you start a project in 2012 or 2013, all the code highlighting is completely correct, but as soon as you change or add any text, everything messes up (like in the above image). So it does seem that Intellisense or whatever controls the highlighting only functions once on start up, and suddenly stops working for the duration of the program.
Delete this key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and restart vs2013.
Found it in a discussion on codeplex. Although my problem was the lack of colors, you should try it
I can't offer a solution to this issue, but I can tell you that it's an issue that's plagued Microsoft Visual Studio 2012. In VS2010, the highlighting was fairly basic for C++, as you couldn't set the colouring on user types and loads of other things.
In VS2010, like you I had no problem with the syntax highlighting at all, but there was a lot less that you could actually highlight. Ever since they introduced this extra highlighting for C++ so you could colour a lot more items, it's been very buggy.
At the moment, I've got operators in all sorts of colours, matching brackets and braces in different colours and half-coloured qualifiers etc. I've just had to live with it... but if you're reading this MS, please... PLEASE... pretty please get it fixed.
Im using MS visual studio 2010 PRoofessional version , and in both languages I'm using (C++ and UnrealScript with Nfringe ) there seems to be no auto complete , also with the nfringe there is no auto indentation either .
I was wondering how to fix this?
Most probably you accidentally switched into low-impact IntelliSense mode by pressing
CTRL+ALT+SPACE Just hit CTRL+ALT+SPACE to go back to the IntelliSense mode.
Are you writing a totally unmanaged C++ dll? There is no intellisense support for CLI/C++ projects in VS 2010
I have actually problems with C++ and Intellisense since VC6...
We now use Whole Tomatoes "Visual Assist" and it repairs Intellisense. :-) This single feature is the money worth.
When you open the solution file, do you get a warning about being unable to open the IntelliSense database? If so, that's the reason—UnrealEngine intentionally has a directory with the same name as the IntelliSense database to prevent its creation (Visual Studio can't create a file if a directory of the same name already exists). The engine code base is so large that having IntelliSense enabled slows everything to a crawl when you're editing code.
I'm also using Unreal Engine, and I met the same problem before, the solution was set the dirs by myself in VS project setting.
Open the property window of ur game project(e.g UDKGame), navigate to "NMake", "Include Search Path", and fill the needed header search path there.
You may copy the path list from the output of UnrealBuildTool.
The values u set here is only used by Visual Studio's IntelliSense, so there's no need to worry about build error.
This only works for C++, I'm not sure what's wrong with Unreal Script. I just updated to Visual Studio 2010 and has not installed the new nFringe.
Hope this answer is not too late