Category: VS2012

Error comparing historic versions of a TFS source controlled file

When working with Visual Studio 2012 on our current project, the error ‘These files are not text files and cannot be opened in the comparison window.’ shows up every now and again. I’ve tried several things to solve this problem. Here’s the one that works: Close Visual Studio Navigate to your version of the ‘c:\users\{username}\AppData\Local\Temp\’ …

Read More “Error comparing historic versions of a TFS source controlled file”

Visual Studio 2012 crashes when opening an ASP.NET MVC project with a cshtml open

A rather long title for this post, but that’s exactly what happened: when I opened an ASP.NET MVC 4 project with a cshtml view open, Visual Studio would crash with the error messages seen on the right. This would only occur if the first project I opened had a cshtml file open. When I opened …

Read More “Visual Studio 2012 crashes when opening an ASP.NET MVC project with a cshtml open”

Debugging JavaScript with Visual Studio in an ASP.NET MVC 4 application

When debugging JavaScript in an ASP.NET MVC (4) application, it is not always enough to uncheck the ‘Disable script debugging’ checkboxes under ‘Tools’ – ‘Internet Options’ – ‘Advanced’ – ‘Browsing’. JavaScript inside a Razor view (a cshtml file) cannot be debugged from Visual Studio. To debug your JavaScript, move it to a separate .js file …

Read More “Debugging JavaScript with Visual Studio in an ASP.NET MVC 4 application”

Enable preview in Visual Studio 2012 after Update 1

After installing Visual Studio 2012 Update 1, my Visual Studio stopped opening files in preview mode when I clicked them in the Solution Explorer. This setting seems to have changed with the installation of Update 1. To re-enable opening files clicked (once) in the Solution Explorer in Preview mode, go to ‘Tools’ – ‘Options’ – …

Read More “Enable preview in Visual Studio 2012 after Update 1”

TIP: “Paste XML as Classes” in Visual Studio 2012

In the past, when you had some XML document that you wanted to translate into classes we had to create / generate a schema based on the XML file. Next, we had to generate a class based on the schema with an external tool. Not all too user friendly and somewhat time consuming. In Visual …

Read More “TIP: “Paste XML as Classes” in Visual Studio 2012”