Recently I had a problem where I added a Visual Studio Test Project to a solution.
As part of our CI, the build server failed to build as it didn’t contain the necessary files for the test framework. One option would have been to install Visual Studio Team System on the build server, but it seems a bit crazy to do that just to get the tests to build.
I found a post here by Mark Kharitonov that explains a method to get tests building without having to install Visual Studio which worked perfectly for me.
Visual Studio contains a number of predefined snippets. Snippets are usually available for common code that is used frequently allowing the developer to insert this code quickly without having to retype it every time. I often use the try and if snippets, but you can also create your own custom snippets. Recently I found myself to be endlessly creating a try/catch block where in the catch I was logging an exception using a custom logger class, so I decided to create a custom snippet to do this for me. In this post I’ll explain how to create a basic snippet, how to configure Visual Studio to use the snippet, and how to use it in code.
The other day I was trying to add new items to my toolbox in Visual Studio 2008 and each time Visual Studio would close itself without reason. I tried the Reset Toolbox option which didn’t solve the problem.
I then tried running Visual Studio in safe mode by choosing run from the start menu and typing ‘devenv /safemode’. In safe mode I was able to get the Choose Items dialog so I just flicked through all the tabs to make sure it was working. I then closed Visual Studio and loaded it normally and everything worked as expected.
Not sure why it happened but this seemed to fix it