Below you will find pages that utilize the taxonomy term “VS2012”
Blog
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\ folder Delete the TFSTemp folder Restart Visual Studio and try again. You should be good to go!
Blog
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 another (type of) project first and then opened a project with a cshtml file open, the problem did not occur.
Blog
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 and link to that file from your Razor view. This way, breakpoints set in the JavaScript will be hit and you can debug from Visual Studio.
Blog
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’ – ‘Environment’ – ‘Tabs and Windows’.
There, check the box under ‘Preview Tab’ – ‘Single-click opens files in the preview tab in:’ – ‘Solution Explorer (Alt + click to avoid previewing)’.
Blog
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 Studio 2012 you copy the XML you want to create a class/classes for, place the cursor in a class file on the location you want the code to be added and select the following menu items: Edit – Paste Special – Paste XML as Classes.