Vsto addin deployment with Clickonce does not include secondary references

I'm working on a Word 2007 addin in Visual Studio 2008. The addin project references several library projects in the same solution. Now, for content files that are part of the addin project, I can set the "Build action" property to "Content" and "Copy to output directory" to true, and they are deployed successfully by Clickonce alongside the addin dll. However, this doesn't work for content files that are included in the projects referenced by the addin project. I've searched SO, and apparently I'm supposed to go to the addin project settings, switch to the "Publish" tab, and add the needed files in the "Application Files" dialog (reference). Problem is, there is no "Application files" dialog on the Publish tab of my addin project (I'm using MSVS 2008). What am I missing here? In short, how can I deploy content files from referenced projects using Clickonce?

Answers


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>

Need Your Help

silverlight mediaelement RTSP

silverlight mediaelement rtsp

As far as I can see silverlight only supports streaming over http even in version 2, as I understand it mms is converted to http and therefore you cannot stream RSTP (I have tried to test this and ...

Have selenium interact with safari "store password" popup?

selenium safari

I have a selenium test that tests the login of a site through a browser instance available on a selenium-grid. This works fine when using a firefox browser instance but when using safari the test c...