Reputation: 1063
I am going to publish a C# windows form application project. I have a folder named "Reports" Containing some report file. when I publish the project , my application cannot find the path of reports. How can I publish my Reports inside the project?
Upvotes: 2
Views: 1636
Reputation: 125197
From solution explorer, choose each file that you need to include in the publish and in the properties of the file set Copy to Output Directory
to true
. This way your files will be included in bin\debug
folder of your application in their current folder names.
Then if you want to use Publish
command, go to properties of the project, in publish tab, click on Application Files
and check Show All Files
and change the Publish Status
of the files you need to Include
.
Pay attention, if your file's Build Action
is Embedded Resource
then you don't need to do anything else to include in the publish because it's included (embedded) in resources of your application.
Upvotes: 2