Ok found root cause.
Noticed this issue is happning only using VS 2010 and having UCCA logic in dll and that dll is loaded dynamically.
Same thing works with VS2005 but fail using VS2010.
After investigation found that for VS 2010 you need manifest file tagged as application manifest in projects. This was not case for VS2005. For VS2010 I just copied manifest file in output dirctory only.
so solution is, add following line in your application project,clean solution and rebuild.
<ApplicationManifest>application.exe.manifest</ApplicationManifest>