ehmad11
ehmad11

Reputation: 1395

c# deployment: install additional file in the installation directory

how to install additional file such as some excel or webpage shortcut in the installation directory so that my executable should be able to access that file? please help

Upvotes: 3

Views: 2557

Answers (2)

RobinDotNet
RobinDotNet

Reputation: 11877

Add the file to your project.
Set the build action to "content".
Set "copy to output directory" to "copy always".
The file should be included in the same folder as the rest of your deployment. You should be able to see it by building it and looking in the \bin\release or the \bin\debug folder. If it's not there, click on the Application Files button and see if it shows up there.

Upvotes: 2

captncraig
captncraig

Reputation: 23068

In the solution explorer, right click on the file and go to properties. Set "Copy to output directory" to "Copy if newer". You may also need to set "Build action" to "Embedded resource" if it is not already.

Upvotes: 1

Related Questions