0

I have a .Net 2.0 solution with several projects.

The solution contains MainProject which has, as a reference, HelperProject (C# Console Application).

MainProject occasionally uses the .exe created by HelperProject.

The problem that I'm having is that HelperProject contains a Content.xml file. The build-action is set to "Content" and Copy to Output Directory is set to "Always".

When I compile the application all the files show up in the debug directory, but when I go to publish MainProject, the content file for HelperProject doesn't make it to the end user.

Can anyone help me understand why this is happening?

And

What should I do to make content from HelperProject appear in the published version of MainProject?

Thanks,

-Z

zorlack
  • 664
  • 2
  • 7
  • 26
  • I haven't digested all the details, but [this question has been asked before on StackOverflow](http://stackoverflow.com/questions/590227/why-doesnt-clickonce-in-visual-studio-deploy-content-files-from-dependent-assemb). I did a *very* quick test with the suggestion to modify the .csproj file (substituting Content.xml for the *.rpt wildcard they were after in that other thread). It didn't work for me. But adding Content.xml as a link to MainProject, and setting it as Content/Copy Always did work -- then Content.xml would be included in publishing. – Andrew Brown Mar 19 '11 at 03:08

1 Answers1

0

Assuming that the xml file is set to publish with the application, be sure to check the Application Files dialog and make sure it is set to Include and not to Include(Data).

By default, ClickOnce considers XML files to be data, and deploys them to the \data\ folder under the ClickOnce cache instead of putting them in the same folder as the application.

RobinDotNet
  • 11,723
  • 3
  • 30
  • 33