Hello ,
If you are running .Net 4 in VS2010, then you may need to add the following to your .config file
<startup uselegacyv2runtimeactivationpolicy="true">
<supportedruntime version="v4.0" sku=".NETFramework,Version=v4.2" />
</startup>
thanks
Animesh