.netclickonce

Why doesn't ClickOnce in Visual Studio deploy content files from dependent assemblies?


I have a smart client application that is deployed via click once. The problem is that i have content files in dependent assemblies that just don't show up in the published application files dialog in visual studio.

This means that everytime I deploy I have to copy all the content files from the application build output directory into the published directory and rebuild the manifests which is a real pain.

Why are these files not visible to the publisher in visual studio?


Solution

  • I seemed to have found an evolution of the answer from @John Hunter that is much simpler, add this to the csproj.

    <ItemGroup>
        <Content Include="Bin\**\*.rpt" />
    </ItemGroup>
    

    This will then make visual studio automatically view all *.rpt files in that folder as part of the solution. You could go with *.* to accumulate everything. This makes more sense if you have a container folder like bin\MyDeployables\**\*.*

    We followed a similar usage for using Cassette MSBuild to combine and minifiy our JS at publish time, and be able to publish the created files through the built in VS publish tooling.