in ur app.config write
<pre lang="xml"><startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>