updated to support both .net 4.5 and 3.5