Visual Studio 2012 – Hiccups

I just switched over to Visual Studio 2012, and was very dismayed to find several problems!

First I updated to the latest-and-greatest version of PostSharp, because it had several fixes for VS2012 and .NET 4.5; that got things compiling but not working very well yet.

  • Visual Studio 2012 RTM wouldn’t open any of my source code!!

    Every time I opened the solution, for every single project it would ask to target the .NET 4.5 framework, but it did a really bad job of switching the projects.  I noticed this because it KEPT asking every time I opened the solution, AND Mercurial didn’t see any file changes.

    One of the major problems was that I couldn’t open any source code file!! Double clicking on a file in the Solution Explorer did absolutely nothing! The file would not open.

    I finally opened the properties for each project in the solution, and found that for many of them the target framework was blank! I manually selected the .NET 4.5 framework, saved the project and then I could open source code files again and VS2012 stopped asking me when I opened the solution (and I could check-in the changed project files).

  • Then, I couldn’t debug anything! The debugger would step over tens of lines at a time, and ever local variable was “null”. The code was acting VERY bizarrely in the debugger, but ran just fine without it. I decompiled my code and boy was it a mess! Turns out that for some reason when I upgraded VS2012 switched to my code-coverage test settings and was filling the class with lots of yucky code that apparently craps out the debugger. I switched to my other test settings and I can debug my code again.

Hopefully that’s all the problems; I need to be productive writing code – not solving stupid issues like these.

On the flip side, the new test runner is great! I really like that I can focus on fixing one test, and I don’t loose all the other failed tests. I also like being able to immediately see the problem with a failed test right in the text explorer, rather than having to open a document window with the test results (and then do all sorts of useless window maintenance).

The only frustrating thing is that the test run keyboard shortcuts seem to have been broken. Ctrl-R + A was running all tests, but just stopped and I had to redefine it. And there doesn’t seem to be any mechanism any more for running all the tests in the current class.


Leave a Reply

Your email address will not be published. Required fields are marked *