Monday 24 September 2012

The service did not respond to the start or control request in a timely fashion.

If your Windows Service does not start and there is the following error under System folder in the Event Viewer:


The ServiceName service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.

It might occur if the .NET Framework, the service uses, is not installed on the machine.

Run your service in command line mode (if it's supported) and you'll see the error saying .NET Framework X.X is not installed.

Then you will know what version you need to download and install

Hope it saved you time, that I spent on finding this out

Sunday 9 September 2012

How to change theme in VS2012

If you already upgraded to Visual Studio 2012 you must be noticed the lack of themes, except the two built-in themes: Light and Dark and menu that is all capitalized. For the last problem there is a workaroud:


  1. Run regedit.exe from command line and find the following: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General
  2. Create a DWORD value named SuppressUppercaseConversion with value 1
In order to add more color themes you can use the Visual Studio 2012 Color Themes Editor by MS:

Thanks for the first tip to  answering the following question:







Tuesday 3 July 2012

How to avoid "is never used" ReSharper warning when class is used in IoC container?

Those of us who use ReSharper and some IoC container, must be familiar with the situation. You write a class, then register it in your container and everything works fine. However, ReSharper marks the class as "is never instantiated" or "is never used". Here a new plugin from Igal Tabachnik comes to our help. It's called Agent Multer and here a short video on how it works.

At the time of writing these lines, the plugin support Ninject, Windsor, Unity and Autofac containers. More details at: http://hmemcpy.github.com/AgentMulder/

Wednesday 8 February 2012

How to update references to a 3rd party assembly in all the projects in the solution?

Let's say you have a 3rd party assembly referenced in many projects in your solution. Once a new version of the 3rd party assembly is released, you probably would like to update the references in all your projects in a solution to the new version.

Are you using NuGet to update 3rd party libraries?
If the answer no, install Extension for Visual Studio RIGHT NOW from NuGet

Copy the following script to the root directory of your solution


Navigate to View -> Other Windows -> Package Management Console

Run the following command

PM> .\Upgrade-Package.ps1 -PackageID:log4net

Sunday 29 January 2012

How to monitor WCF Service up time using Performance Counters?

I was asked to monitor how long WCF service is up using Performance Counters. There is no WCF specific counter that displays this. Actually it depends on the hosting of your WCF service.

- If the service is hosted in IIS, use "Service Uptime" performance counter under "Web Service Category"
- If the service is hosted in Console application or Windows Service, you can use "Elapsed Time" in "Process" category

Thanks to Josef Pfleger for answering my question

Wednesday 4 January 2012

Best Visual Studio add in for debugging .NET

I am sure it happens for most of us: when you debug some code, you need to see a certain property in debug without changing the ToString() implementation or to see the return value of a method without stepping out of it. You say in heart "I wish it would be possible" and continue to debug the old way. Two courage guys Vitaly Belman and Omer Aviv had quit their job to make their dream true. They have developed a Visual Studio addin that makes what ReSharper to the code writing.




Free trial for 60 days:
http://www.bugaidsoftware.com/