This happened to me in Visual Studio 2008 pre and post 2008 sp1 on more than one computer and to someone else I know, so it can't be an isolated incident.
Seemingly random, every so often I lose all syntax highlighting in my aspx page (the html) so that Visual Studio now looks like a really expensive version of notepad.
Does anyone know why does happens? Better yet, anyone know how to fix it?
it happened to me after an uninstall of visual studio using a removal tool at http://msdn.microsoft.com/en-us/vstudio/bb968856.aspx
I had to run this before upgrading sql server management studio to 2008 version
syntax highlighting has disappeared since because of package loading failures. I didn't find the fix yet so if anybody has an idea...
You have basically experienced Visual Studio giving up. It gives up for many reason, the page is too complicated to highlight which is usually because there are too many syntax errors. The highlighting is done with some very complicated and intelligent RegEx statements essentially, however if Visual Studio is unable to apply them it just displays black text.
One thing to try is to fix all the syntax issues, if any.
By the way this "giving up" happens in most IDE's. I have seen it happen once or twice in Elcipse too.
Try Ctrl-K, Ctrl-D (reformat document). This will usually restore you syntax coloring. If it doesn't, it should tell you where it got confused (e.g. Couldn't reformat due to line 123).
I've followed the instructions from Andrea but had to include the following procedure:
Andrea Instructions:
Enter VS2008, click on Tools/Options
Check "Show all settings" option
Choose Environment/International Settings
Change the language combo box.
Close VS2008.
...then...
After closing Visual Studio, run this command below from a command prompt with admin permission:
run devenv /resetskippkgs
Reference: http://forums.asp.net/t/1413383.aspx
when this happens to me, i let it sit there for a minute. it will usually bring the syntax highlighting back.
i had the same problem. Installation of DPack
solved this issue
Enter VS2008, click on Tools/Options
Check "Show all settings" option
Choose Environment/International Settings
Change the language combo box.
Close VS2008.
Related
I have a asp.net project that I have run many times without issue. Yesterday for some reason when I hit the play button it looks like it is compiling in the output window but then it just sits there. The hour glass is showing on the cursor but no response from VS. At times it will open internet explorer but then it will continually show "Waiting for localhost" on the tab. I did delete the *.suo file and it didn't seem to fix it.
I'm running visual studio professional 2012 Version 11.0.61219.00 Update 5.
My .net framwork version is 4.6.01055.
Thank you for any help.
Try rebuilding your project but if that doesn't work it is a high chance that something is wrong with your code and it we will need to see it.
I followed the steps in this link and it fixed my issue. It was a symbol loading issue. So far I tried a couple of projects and they loaded pretty quick. Thanks again for help everyone.
Visual Studio Debugging/Loading Very Slow
I have a ASP Project running Visual Studio 2013 having very bad Performance while debuging/running the Project. The same Project running on a normal IIS Server is super fast with no Problems. Other Projects are running also super fast with no Problems (also on VS2013).
I have already tryed the following:
Delete All Breakpoints does nothing.
Debug or Release version, doesn't matter.
start without Debugging has the same problem.
Putting my project on a full IIS implementation on a web server runs it super fast with no problems.
Clean Solution, or deleting the .suo also do nothing
comment all the CodeBehind and the JavaScript
the solution with symbol loading from Visual Studio debugging/loading very slow also dont work.
Another often mentioned solution is to deactivate Intellitrace, but I don't found how to do that in VS2013 (the Intellitrace MenuItem in the Tools/Options Menu is missing)
There are many empty ScriptDocuments created while running, dont know if that has anything to do with the Problem.
Thanks for any Ideas!
This may sound strange, I had the same problem and tried all suggestions I found on the internet. The cause for me was I has a blank DVD in my drive. I found this by looking at where Visual Studio was trying to load the symbols from "my d drive (dvd)". After I ejected the blank DVD it was back to normal. This was very strange but just saying, check where VS is trying to load the symbols from in the output window. Hope this save someone from running round in circles.
In Visual Studio 2010 SP1, automatic outlining is not enabled for ASPX files when I open them. For each file opened, I need to click Edit / Outlining / Start automatic outlining, which is extremely annoying. This step is not necessary when code-only (non-ASPX) files are opened.
I use a few extensions, all of them from MS, including Power Tools, the JavaScript tools, etc., and I thought that maybe they were causing the problem, so I disabled all of them and restarted VS, but the problem still exists.
I did not have this problem with VS2010 (no SP) on Win XP Pro, which I used for about 18 months, but I recently did a clean install of Win 7 x64, VS2010, and VS2010 SP1, and now I have this issue.
Any ideas?
This worked for me:
In the registry, look here:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
for a value named OutlineHTMLOnFileOpen. Mine was set to 0, change it to 1. Make sure you do this while VS is closed, as it saves this value out on exit and will change it back.
I had this issue and it was driving me crazy all week!!
Finally managed to fix it really easy:
Make sure the registry value for OutlineHTMLOnFileOpen is set to: -1
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
OutlineHTMLOnFileOpen = -1
Open VS then open an aspx file.
Press CTRL M then M again while keeping the CTRL key depressed.
Press Ctrl+ M M
Wait a few moments and the automatic outlining engine will start.
Restart VS and it should auto kick in again when you open a file.
I had the same problem and went through and disabled my extensions. Once I disabled the Javascript Addins from Microsoft (That give the outlining and brace matching), I found I was able to change the registry setting and it didn't set change back. I'm going to reinstal the addin to see if it was the actual cause.
I posted the same question at the MS forums, and was told to do the following, which I have not yet had time to try, but I thought I would add it here for now:
Please try to create two new project (one is the same type project as
your previous project, one is another type project.) see whether this
issue still exists.
If this issue still exists, you can try the following solutions:
If we reboot the operating system to safe mode, do we have the
problem? This can help to isolate whether any other applications are
interfering with Visual Studio. Note that some features (like IIS) are
not available under safe mode. Please check whether this can apply or
not. In addition to safe mode, we can also suggest “clean boot”:
http://support.microsoft.com/kb/310353 .
If we create a new user account, do we have the problem? This can
help to isolate user profile corruption related causes.
If we use “devenv.exe /resetsettings”, does it solve the problem?
It restores Visual Studio default settings.
If the problem remains, we can use Visual Studio Setup Wizard (via
Control Panel) to repair Visual Studio. It can restore the Visual
Studio Installation into its original state.
The forum thread is here.
I will provide my results if I make progress.
Using Ctrl + M should toggle this if you're focused on the file having trouble. I had the same problem until I realized had been accidentally using the hot keys to turn this on and off.
I never had this problem before, but I reinstalled my computer recently and Visual Studio is not behaving well in debug for an ASP.NET site.
I am attaching visual studio 2008 to the w3wp process to debug a website. When I am debugging a method line by line with F10, sometimes visual studio will decide that it continues until it encounter a breakpoint... It's almost like if I pressed F5 to let it continue, but I press F10. For example if a method call is called more than once and there's a breakpoint at the beginning, while I am debugging line by line inside the method sometimes the execution will continue to the breakpoint at the beginning for no apparent reason so I lose all my debugging...
Anyone had this problem before?
Thanks,
I have the same problem, whenever I press step-into or step-over it continues to execution as if I pressed F5.
Debugging is working only if I put a break point on every line I wish to evaluate.
Is anyone else experiencing this besides me and the poster?
I've tried re-installing VS and everything but that didn't help.
Furthermore, debugging does work in some other projects, to be specific WinForms projects, and when I press step into on the webservice call and "attach", debugging still works as it should.
OK, Update...
I have found that my problem lies with Optimizations in compilation.
I had optimizations turned on in debug configuration.
Make sure you uncheck that for debug configuration on all your projects and their references.
Also try: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193
The patch for this issue is here: http://code.msdn.microsoft.com/KB957912/Release/ProjectReleases.aspx?ReleaseId=1796
KB957912 - Update for Visual Studio 2008 SP1 Debugging and Breakpoints
Cehck to make sure that your build mode is set to Debug not Release. In Release mode the optimizer is turned on and code can be rearranged or removed. Your breakpoints may make no sense from the perspective of the actual code.
You're probably debugging an assembly with an out of date PDB file, or perhaps the code has changed and wasn't recompiled.
In any case, it sounds like you have a mismatch somewhere between:
code
dll
pdb
(and as another guy noted, make sure you're building in Debug, not Release).
This almost sounds like the behaviour you get when debugging while having several threads or requests going on in parallell, alternatively if your method makes recursive calls. Are you sure this is not what happens?
I had the same issue after rebuilding my computer. After searching for answers, I found this thread. The solution for me was the hotfix found on MSDN, noted by a user in this thread.
http://code.msdn.microsoft.com/KB957912/Release/ProjectReleases.aspx?ReleaseId=1796
--Notable discussion--
MSDN does also have a great topic discussion, also noted by a user in this thread, with some workaround and a link to the patch.
social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193
I have seen a post where the following line of code was placed at the beginning of Page_Load(...) method. Personally this was not an option for me, but if you are comfortable with this being a fix for your problem and it works...
Response.Cache.SetCacheability(HttpCacheability.NoCache);
My setup:
- Windows XP pro
- Pentium 4 3.0GHz HyperThreaded
- VS 2008 Professional Edition
- .NET Framework 3.5 SP1
- SQL Server 2008
- Development language: c#
For me it started working only after cleaning and rebuilding the solution.
You aren't using multiple threads are you? That could cause this behaviour.
And do you have this problem in different projects, or just in a single project?
Line by line debugging is F11 (Step Into), not F10 (Step Over).
Step Over will skip debugging on any methods you call.
Alternative thought - have you tried using step into (F11) instead of step over (F10). If you're finding that method calls appear to be "skipped", it's possible that you're executing over the next line without actually stepping into it...
Make sure your line endings are consistent. Windows likes CR/LF. Sometimes it gets confused about what line it is on if they aren't consistent.
Workaround found here http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193:
1) Open Visual Studio but do not open any projects.
2) Start the Task Manager (Ctrl+Shift+Esc) and navigate to the “Processes” tab.
3) Right-click on devenv.exe and select “Set Affinity…” (this option is only available on multi-processor or multi-core machines).
4) Uncheck every CPU except one and click OK.
5) Open your project and debug as normal.
Silverlight tools are not fixing the problem and the other patch provided in this forum thread either. This is the only working workaround I found yet.
Does any else have a problem where when using VS2005 or VS2008, it suddenly 'forgets' to color code and format the text for you? All of a sudden it acts like its a plain old notepad editor. Sometimes if I save and re-open the file, or else re-start Visual studio altogether, it suddenly 'remembers'. I thought maybe this was because of a bad install on my machine, but recently upgraded to a new one, brand new fresh install with all service packs - and we are right back to the erratic behaviour....
Is this a known problem? Is there a workaround (i.e. a key combo I can hit to tell it to do its thing?)
PS: This happens for me when doing asp.net with VB code - not sure if it affects other flavors of the tool...
EDIT: This is a clean install of VS2008 on Vista, but also have had it on XP. No addins on either setup, problem happens routinely.
Sometimes something similar to this happens to me in VB.Net. In my case it has alway been the backgroundcompiler service that has stopped working for one reason or another. Haven't found anything that helps besides restarting visual studio.
I got this often when working on large web projects (> 1K pages and 4K total files) and most often on ashx files.
At the same time, I would lose intellisense, This was happening because the files I was adding were not getting marked as "Compile" in the file properties -> build option.
I never found the cause (assumed it was overburdening the solution) but I found that it would stay fixed for longer if I deleted the SUO file periodically (it was getting into the 1MB range).
Since coming to a new company, new PC, etc, I have not had this problem but then again I'm not working on as large of a web project.
I use C# in VS2008, and haven't had any problems. Maybe this is VB.NET related?
I used to see the problem with "Web Sites". I have since changed most of my projects to "Web Applications" and haven't seen the issue in a while.
I had a similar issue with VS 2003. I use VS 2008 right now and this doesn't happen anymore.