The solution is to use custom Microsoft.VisualStudio.Tools.Office.targets without problematic targets.
<Import Project="..\Microsoft.VisualStudio.Tools.Office.targets" />
<Target Name="AfterCompile">
<Exec Command="$(IntelliLockLocation) -project $(IntelliLockProject) -file "$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)" -targetfile "$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)" -snkeypair "$(ProjectDir)$(AssemblyOriginatorKeyFile)" -snpassword *****" />
</Target>