I\'ve created a Windows C# project and made it as ClickOnce Application(Publish feature in Project properties) for Installation. I want to Include a folder<
So Tom has explained how to add a file. You specifically say you would like to add a folder to your ClickOnce application once you publish it. Lets assume you have a folder sitting in the root of your solution named Dependencies
which contains a folder Reports
which contains all of your RPT files. Here is how you would make sure your deployed app contains all of the contents of the Dependencies
folder:
Right click your project in Visual Studio and select "unload project".
Right click and select to edit the csproj file.
Before the closing tag add this:
%(RecursiveDir)%(Filename)%(Extension)
That will add everything from the Dependencies folder into the project. We are using the \**\*
syntax at the end of the Include and %(RecursiveDir)
to ensure the Reports
folder will be present in the published version as well as the report files. Having set
you won't see the items cluttering up the solution explorer.