VS2015, C#, where to place PDF file into resource so it release to include PDF and how to reference to them to open?

I have several PDF files that ia generated from Word documnet. I like to include PDF into project and make reference to them. I cannot place it into resource folder since it only for graphic element files.

I like a best solution to open the PDF file by external 3rd party viewer. I do not wish to make use of internal PDF veiwer within the C# project.
Richard PayneChief Technology EngineerAsked:
Who is Participating?
 
anarki_jimbelConnect With a Mentor Commented:
One way I know is like below:

a) E.g., drag and drop a pdf file to the solutions explorer, or include it to the solution by any other way;
b) Select the file in the solutions explorer, then open and modify it's properties like:
 - Build Action: Content;
 - Copy to Output Directory: Copy always
c) The path to the file after the application is installed should be like:
  string path = Application.StartupPath + "\\MyPDF.pdf".
or may be like (can't remember exactly)
Application.StartupPath + "\\Resources\\MyPDF.pdf";
1
 
Richard PayneChief Technology EngineerAuthor Commented:
Thank, that work, created new folder as PDFBIN which automatically placed onto obj. The properties make all the difference.
0
All Courses

From novice to tech pro — start learning today.