Archive for Visual Studio:
When trying to debug in Visual Studio, you get the following error:
Breakpoint will not currently be hit. No symbols loaded for this document.
After some research, I came up with a solution: delete temporary ASP.NET files. This is how you do it:
- Locate your temporary ASP.NET files and delete them. They're probably located in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files.
- Rebuild your project and attach to process and you should be fine - the breakpoint should be hit.
I recently ran into a minor problem with my Visual Studio theme - the current line was highlighted and because of that I had quite a hard time reading the code and comments on the specific line.
Since I've been dealing with Visual Studio themes a bit lately, I knew how to change the theme colours, via Tools -> Options -> Environment -> Fonts and Colors. However - there are quite a lot alternatives to go through and it isn't always easy to find which alternative corresponds to what Visual Studio theme setting.
Then I found how you could change the appearance of the current line. This is how:
- Find the Current Line (extension) and Current Line Inactive (extension) rows.
- Change foreground and background.
This is how it could look:

Now, most of the Visual Studio users might not have those rows under Fonts and Colors. This is because the Productivity Power Tools must be installed.
The Productivity Power Tools will not only give you more control over Visual Studio's current line, but much more. If you're a serious Visual Studio developer, install the tools!
(Thanks to Patrik Totero for providing me with the Visual Studio theme)
I recently stumbled upon a problem where some Visual Studio templates wasn't available when I choose Add new item in Visual Studio.
I needed to generate some LINQ to SQL classes, but the Data alternative wasn't there.
After some searching, here's what solved the problem:
For Visual Studio 2010, find the VS command prompt (in the start menu), right click it and choose 'Run as administrator'. Execute this command:
devenv.exe /vsinstalltemplates
You won't be noticed if anything succeeds or fails, but you should now have the appropriate Visual Studio templates available in the Add new item menu.
For Visual Studio 2008, I solved the problem by re-installing Visual Studio 2008 Service Pack 1.
Also, you can have a look in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates folder to see what's missing. You can even copy zip files from other Visual Studio installations to the folders here and execute the above command for Visual Studio 2010, and get it working.
Also - there's a difference when adding files in Solution Explorer, compared to through the File menu.
Here are some blog posts and stack overflow posts that helped me:
If you, like me, like to take a deep plunge into Visual Studio debugging, you might've encountered the dreaded Web server process termination error, "The web server process that was being debugged has been terminated by Internet Information Services":

It's very irritating when you're in the middle of a debugging session and it's stopped by the error message above. But - there's a solution! As the error message tells us, you can configure application pool settings in IIS.
This is how to do make sure you'll be able to debug forever:
- Pop up your IIS and find the correct Application Pool
- Right click and choose Advanced Settings
- Below Process Model, find Ping Enabled and make sure it says False:

- Done!
Here are a couple of quick steps that will make your Visual Studio faster (particularly 2005 and 2008 version):
-
Turn off AutoRecover
Under Tools->Options->Environment->AutoRecover, untick Save AutoRecover information every.
This turns off the AutoRecover mode, which makes sure you quickly can get crashed Visual Studio instances back.
-
Turn off animations
Under Tools->Options->Environment, untick Animate environment tools.
-
Turn off track changes
Under Tools->Options->Text Editor, untick Track changes.
Track changes is used to tell you what section of the code you've recently edited.
-
Turn off the Visual Studio start page
Under Tools->Options->Environment->Startup, choose the alternative Show empty environment under At startup.
-
Install the latest service pack
It's always a great idea to have the latest service pack installed. Download Service Pack 1 for Visual Studio 2008.
Visual Studio sometimes points out that HTML and CSS in a project doesn't validate, showing the dreaded Error list with errors and warnings.
This is one of the most annoying things about Visual Studio, since it becomes harder to find real compilation errors in the error list. Plus, it's better to use the web browser and add-ons (e.g. Firefox with the HTML Validator add-on) to find validation errors.
This is how the error list might look in Visual Studio, pointing out validation errors:

How to turn off validation errors in Visual Studio
- In Visual Studio, go to Tools->Options and expand the node Text Editor.
- To turn off HTML validation, expand the node HTML, choose Validation and untick Show errors under Options. Press Ok.
- To turn off CSS validation, expand the node CSS, choose CSS Specific and untick Detect errors under Errors. Press Ok.
- Done!