Results 1 to 4 of 4

Thread: [RESOLVED] Adding files to setup

  1. #1

    Thread Starter
    Addicted Member BSA01's Avatar
    Join Date
    Apr 2009
    Location
    Bosnia and Herzegovina
    Posts
    146

    Resolved [RESOLVED] Adding files to setup

    Is it possible to add file (in this case PDF) to setup ( standard Visual Studio publish) ? I don't want to add it to exe file like resource, I want that setup copy it to Application Folder so I can know path. where to put the file and what settings to set for this case ?
    Thank you

  2. #2

    Thread Starter
    Addicted Member BSA01's Avatar
    Join Date
    Apr 2009
    Location
    Bosnia and Herzegovina
    Posts
    146

    Re: Adding files to setup

    It seems that I have half answer. I copy it to resource folder in Visual Studio's Solution Explorer and put "Compile action" to "Content". So, now I need second half, where is it when application is installed ? What is reference path (Application Data, Data Path, etc.)

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Adding files to setup

    That's contradictory. A file is either a resource or content, not both. If you want a resource then add the file to the Resources page of the project properties, NOT to the Solution Explorer. The file will then be compiled into the EXE, which is what resources are. If you want content then just add the file to the solution, NOT in the Resources folder because it's not a resource. Set the Build Action to Content, as you did, and then add a project output to your Setup project and select Content as the output type.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Addicted Member BSA01's Avatar
    Join Date
    Apr 2009
    Location
    Bosnia and Herzegovina
    Posts
    146

    Re: Adding files to setup

    Quote Originally Posted by jmcilhinney View Post
    That's contradictory. A file is either a resource or content, not both. If you want a resource then add the file to the Resources page of the project properties, NOT to the Solution Explorer. The file will then be compiled into the EXE, which is what resources are. If you want content then just add the file to the solution, NOT in the Resources folder because it's not a resource. Set the Build Action to Content, as you did, and then add a project output to your Setup project and select Content as the output type.
    Thank you, I resolved this. And even, I don't need to know path to the file, jus name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width