So I just upgraded to Visual Studio 2017, and sure enough I encountered a few problems. The most recent one is the XAML designer is refusing to show colored syntax highlighting. Here's a picture:
I have tried resetting my settings through Tools->Import and Export Settings->Reset All Settings. However, this did nothing but reset my layout. Is anyone else experiencing this? How can I fix it?
I think the font's or the settings for the XAML highlighting are missing. The easiest thing that I suggest you trying, which is already available to you is:
1)Go to Start
2)Search and run Visual Studio Installer
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
3)You are going to have 3 options depending on the version you have installed
4)You will have 3 Buttons. Click the hamburger menu button (3rd).
5)Select Repair.
That should repair the installation and I believe it should work just fine!
I see you already have an accepted answer but I have discovered a much easier way to resolve the issue that worked for me on both of the machines where I was being affected by it.
I simply opened up Tools -> Options, expanded Environment, clicked on Fonts and Colors and then changed my Theme from Dark to Blue and clicked OK.
The XAML window then reflected the new settings and had proper syntax highlighting. I then switched it back to Dark (because real developers use a dark theme) and the syntax highlighting has worked ever since.
Good luck.
Related
I did a fresh install of Visual Studio 2022 v17.0.0 (.NET 6.0) and created a new WebAssembly project. Tried editing Counter component but none of the snippets work for C#.
Typing cw is supposed to bring up Console.WriteLine but nothing happens, tabbing does nothing but insert tabs. Tried several other snippets and same results. If I enter Console. I should get suggestions popping up but I get nothing.
I tried doing a repair installation but didn't fix the problem. Any suggestions as to what else I can try to fix. Thanks
Most likley it is functioning but I found that VS 2022 made som changes to the default behaviour.
Make sure that when you type your phrase in the the document that it is appearing on top of the suggestion box.
Example showing suggestion
If not press ctrl + alt + space. Try again.
Example not showing suggestion
If you are experiencing that the phrase you are typing is not default selected when you try to tab out your snippet you may want to change your IntelliSense behaviour from 'Include snippets when ?- Tab....' to 'Always include snippets'.
Tools > Options > Text Editor > C# > IntelliSense > 'Always include snippets'
Best of luck, fingers crossed, godspeed and all that. =)
Go to tools/options/texteditor/advanced and check that default intellisense completion mode is automatic.
Then I have the cw snippet appearing, and it is inserted after typing twice tab:
With ctrl+k, ctrl+b check that your snippets are present; if there is a problem here, you may have a problem with your snippet file.
Other remarks:
Do not log in as user as it may rewrite you parameters.
If a repair does not work, deinstalling then installing again VS will give a cleaner install.
I had the same problem but managed to get things working again. In the Code Snippets Manager (CTRL + K CTRL + B) I noticed my snippets folder had the same name as another folder ("Visual C#"). I removed my folder from Code Snippets Manager, renamed it in File Explorer to be unique when in the Code Snippets Manager, then added it back in to Code Snippets Manager.
I then had to restart my Visual Studio 2022 before it recognised my snippets.
Following that, it seems I can edit my snippets without having to restart VS. I'd say VS 2022 has a problem with the initial recognition of the custom snippets folder.
If you re-add the snippets and restart Visual Studio it works.
In my case, if I copied the folder in the picture and opened in explorer it seems like the folder doesn't exist. But if I press "Add" and navigate to this folder it does exist and I can add the default snippets again.
For me only enabling Always include snippets didn't work. With the Visual Studio 2022, Version 17.4.3 I had to disable the Show new snippet experience (experimental) option in the Tools->Options->Text Editor->IntelliSense. There is no need to restart VS.
My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).
Does anyone know the problem and how to restore this functionality again?
Have you checked Tools→Options...→Text Editor→C#→Advanced→Underline errors in the editor?
I usually like to reset my settings after messing around with plugins, as they tend to mess with settings: Tools→Import and Export Settings...→Reset all settings.
About possible causes.
For VS 2012 and 2013 if you have more than one instance of Visual Studio on different machines binded to one "live" account and have installed ReSharper on one of them, it disables the native IntelliSense and error underlines (to replace by it's own rules) that will be synchronised through your account to another machine without ReSharper.
Found it in Visual Studio 2019 as: Tools > Options > Text Editor > General > Show error squiggles
This is generally called Disable Squiggly or Wavy lines in Visual Studio.
How you will do in Visual studio 2013?
TOOLS -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Squiggles: True/False (Under IntelliSense) -> Press OK
I know its an old question, and with various solutions, but I have fixed it in different way. I'm working with Unity3D on my C# code using VS2017, when suddenly VS decides to stop underlining error while im typing. However, if I close the file tab and reopen, it suddenly undelines the error.
For example:
class A {
public int x;
s;
}
should obvsiouly give an error for that lonely 's' symbol. But, VS doesn't underline it until I close and reopen this file tab.
Solution:
Copied the entire Unity Project folder (which is like a regular VS Solution folder basically) and worked with the new folder, which issue was gone there.
For visual studio 2017 act according to HeeJae's comments in:
https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html
i.e:
Hi. you are probably hitting a known issue. can you try this?
1.Update to latest release If that doesn’t solve it
2.Go to Tools\Options\Projects and Solutions\General and uncheck “Allow parallel project initialization”.
3.Close VS.
4.Delete the “.vs” directory beside their solution file.
5.Reopen VS.
..
thank you
You can re-enable the "Allow parallel project initialization" option after the issue was solved.
I tried to upgrade VS, reset VS settings, clear VS cache and everything people do conventionally but none of them solved this issue! At the end the mentioned solution worked for me magically.
Good luck
Unloading and loading same project again from the solution does the trick. Just right click on the project and click "Unload Project". Once unloaded, again right click the same project and click "Reload Project". Error highlighting will return.
I had the same issue with 2017. There was a 'disable intelisense' option, make sure that is set to false.
For everyone wondering in 2021..
search for "C_Cpp.errorSquiggles" in the settings.
Make sure to have it active for the user, as well as the workspace.
No need to restart Visual Studio.
For me (VS 2019) , after trying the other answers also, setting the scope of analysis from "Current document" to Open document" brought back the missing error markers
Just go to settings and search for errors and Image in Error Squiggles. You can see the Error squiggles (Modified: Workspace - Right now you can't see it because I modified it). Just click on modified and you will see the disabled option. If by mistake you disabled it, just enable it and you can see the red line errors again in your code.
In latest edition, check for .vscode folder in same project folder. There will be a setting.json file in that. Delete the key value pair of "C_Cpp.errorSquiggles": "Disabled". Restart the vs code.
So I recently have had an interest in learning C# and so I downloaded Visual Studio Code, assuming that it would be the best place to start. The biggest problem at the moment is that everything looks so empty because buttons are invisible. I can still program and things just fine, it's just hard to know what I'm looking at when half of the UI is missing.
Here is a pic of what I'm explaining:
https://i.gyazo.com/a3f8b0ae48c8fcdc15d92c6ce81e34eb.png
As you can see, the UI buttons on the right aren't visible.. If anyone has experienced this bug and has found a fix for it, that would be great! Thanks guys!
I would suggest trying Visual Studio Community Edition instead of Code. It's also free and includes a lot more functionality.
Martins answer is not targeting the original question, so I suggest to remove it. You are seeing invisible icons because of an issue in VS Code that we noticed on some Windows installations. We use SVG icons and sometimes the Windows registry is not having a correct entry for their file type. The fix is documented on our FAQ page (https://code.visualstudio.com/Docs/FAQ):
Open an Administrator Command Prompt.
Type REG ADD HKCR\.svg /f /v "Content Type" /t REG_SZ /d image/svg+xml
Then restart VS Code and things should be good.
I'm new to Visual Studio and couldn't find my answer anywhere else for hours over the internet..
I'm Using "Visual Studio Express 2012 for Windows" and everytime I create a new project with a blank page (XAML), the designer only shows me the frame of the page with its missing background.
And any control I drag to it, is invisible (I can only see the square border of the control I dragged but no texture..)
This is only happening during design time. On RunTime it actually shows up..
This is happening to me since I had the first fresh install. Just to be clear, I am NOT opening an existing previous project.. I have non. This is the first time I make a project in C# and I'm surprised I didn't find anything useful so far over internet search..
Also tried installing, uninstalling, repairing and changing to different versions...
The problem didn't show on Visual Studio 2012 Express for Desktop, but this product doesn't seem to be fit to my needs.. (I'm trying to also learn how to develop for Windows Store and other products)
The IDE doesn't show any errors or warnings..
Help would be much appreciated!
P.S - I'm running Windows 8.1
You can try Blend to open the project and render the xaml,if the problem appear too, maybe you should check out your graphics card or update driver.
try with this!
Check the following:
Tools -> Options
Expand Text Editor -> XAML -> Miscellaneous
Make sure that "Always open documents in full XAML view" is not checked
Or perhaps the default program for opening .xaml files has changed:
Right-click your .xaml file in Solution Explorer
Click Open With...
Select XAML UI Designer
Click Set as Default button
Click OK
If it's related to the video driver, maybe disabling hardware acceleration will help?
Or you could try Visual Studio Community Edition (http://www.visualstudio.com/, click on the Download button under "Free developer tools"
Did one of these suggestions work?
I've installed Visual Studio 2012 after reformatting my computer.
When I open a xaml file in a new empty wpf project, it opens it in a regular code editor and doesn't let me choose Design View (the option is just not there).
Right-clicking the xaml file and choosing "View Designer" opens a new code window instead of a new designer window. (yes, the same code window is actually opened twice)
Right-clicking the xaml file and choosing "Open With" shows that I'm missing the Xaml UI designer editor. (it doesn't show anywhere on the list)
I've tried running "devenv.exe /ResetSkipPkgs" and "devenv.exe /resetuserdata" and Repairing visual studio's installation all together (both by re-installing and the Repair button in the installation wizard).
Nothing seems to help.
Anyone familiar with the problem and knows how to fix?
Something else to try, I know a lot of folks disable the designer for performance reasons. This is done with a file extension association in visual studio. I'm wondering if the reverse may help you?
If you right click a XAML file in your solution and select Open with...
... You should see XAML UI designer as an option! select it and click 'Set as default'.
Hopefully that works for you.
I am just guessing, but my experience with VS2012 is, that sometimes it cannot access the registry, because it fails to set an owner for the newly created registry keys.
Without owner noone but the System can access those Keys.
I used resplendence Registrar Registry Editor Trial Version to Fix the broken Keys.
I would especially check
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0
and
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\XamlEditor
because you can find all the settings there.
In addition i experienced this error only on recently reformatted win 7 systems.
And all of them have ssd's, but i am not sure if it only occurs on systems where no "old" harddrive is. But i found some people on msdn who also experienced issues whith VS2012 and having only a ssd in the system.