changed solution from .net 4.5 to .net 4.0 and fixed code to make it compile in 4.0.