I faced a similar problem with secondary dependencies and ClickOnce for VSTO in Visual Studio 2010.
I modified the Visual Studio project file to use a custom ItemGroup
for ClickOnce files as well as a target to manually copy the files from this group after the PublishOnly
target.
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="Installer Files">
<ClickOnce Include="lib\**">
<InProject>false</InProject>
<Visible>false</Visible>
</ClickOnce>
</ItemGroup>
<Target Name="Package" DependsOnTargets="Build" AfterTargets="PublishOnly">
<!-- copy the ClickOnce files to the folder setup-->
<Copy SourceFiles="@(PublishTempFiles)" DestinationFolder="setup\%(RecursiveDir)" />
<!-- copy the lib binaries to the ClickOnce app files -->
<Copy SourceFiles="@(ClickOnce)" DestinationFiles="setup\$(ApplicationFilesFolderName)\$(ProjectName)_$(UnderscoredPublishVersion)\%(Filename)%(Extension).deploy" />
</Target>
</Project>