Disable Publishing in MSBuild
I solved the problem by unchecking 'Sign ClickOnce Manifests' in the 'Signing' tab as well as 'Enable ClickOnce security settings' in the 'Security' tab.
2 ways to do it,
Go to the web project and click on properties, go to the 'Package/Publish Web' tab and uncheck the option
Over ride it from your build definition, click edit on your build defination, go to process tab and expand advanced and pass the following argument /P:CreatePackageOnPublish=false
HTH Cheers, Tarun
For WinForms Windows Application
Go to: Project > Properties > Security
Then uncheck 'Enable ClickOnce security settings'