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?
-
Answer:
Ok I still don't know why Visual studio cannot display referenced content files with its publish ui but I found a work around to force the publish to include these files. Put this in the project file. <ItemGroup> <AdditionalPublishFile Include="$(OutputPath)\**\*.rpt"> <Visible>False</Visible> </AdditionalPublishFile> </ItemGroup> <Target Name="BeforePublish"> <Touch Files="@(IntermediateAssembly)" /> <CreateItem Include="@(AdditionalPublishFile)" AdditionalMetadata="TargetPath=%(RecursiveDir)%(Filename)%(extension);IsDataFile=false"> <Output TaskParameter="Include" ItemName="_DeploymentManifestFiles" /> </CreateItem> </Target>
John Hunter at Stack Overflow Visit the source
Other answers
I think my answer from http://stackoverflow.com/questions/423162/deploying-content-file-from-dependent-assemblies-with-clickonce/424691#424691 answers your question. Summary Either... Add your content files to your project using the "Add as link" feature. Or... Create a post-build event to copy your content files to the main output folder.
whatknott
I assume this solution was based on: http://blogs.msdn.com/mwade/archive/2008/06/29/how-to-publish-files-which-are-not-in-the-project.aspx As per my recent comment on the post: At what point should we expect these to appear in the "Application Files" listings (if at all)? Or is safe to assume they'll end up in our deployed data files listing? In my case I'm hoping to use: False To include all content files from dependent assemblies that are within the "Resources" subfolder of the build directory. Andrew.
Reddog
Related Q & A:
- Why doesn't my PHP function work as expected?Best solution by Stack Overflow
- Why doesn't MySQL upload my data properly?Best solution by php-mysql-tutorial.com
- Why doesn't the messenger load?Best solution by Yahoo! Answers
- Why doesn't my computer alert me of new e-mail?Best solution by Yahoo! Answers
- Why doesn't Yahoo delete spam?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.