Although using framework 4.5 I don't know why this error was coming.
But I checked for windows update and installed these following:
-Service Pack 2 for Microsoft Office 2010 (KB2687455) 64-Bit Edition[important]
-Update for Microsoft .NET Framework 3.5.1
on Windows 7 and Windows Server 2008 R2 SP1
for x64-based Systems (KB2836942)[recommended]
-Update for Microsoft .NET Framework 3.5.1
on Windows 7 and Windows Server 2008 R2 SP1
for x64-based Systems (KB2836943)[recommended]
After installing the above I am not getting the error.