In visual studio 2010 I created a new project and added all the forms (only forms) from the old project yo my new project.
Now when every thing is done and all the error are solved i built my project and run it worked fine.
Now as i found on the internet to change the trustinfo from "asInvoker" to "requireAdministrator" in the app.manifest file. I realized that there is no need to open app.manifest from the solution explorer. It is created when invoked for the first time and opened when after that whenever we click on the View Windows Settings button in the project property on the Application tab. Now when the app.manifest file is created which initially looks like this
<asmv1:assembly manifestversion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyidentity version="1.0.0.0" name="MyApplication.app" />
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedexecutionlevel level="asInvoker" uiaccess="false" />
</requestedprivileges>
</security>
</trustinfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
</application>
</compatibility>
</asmv1:assembly>
Just change this line
<requestedexecutionlevel level="asInvoker" uiaccess="false" />
to this
<requestedexecutionlevel level="requireAdministrator" uiaccess="false" />
and ur done.
There no need to add any file from any where. It works fine on my visual studio 2010 SP1.