Adding files to Visual studio setup project RRS feed

  • Question

  • User-616873265 posted


    I'm using Visual studio setup project for creating web setup project(.msi) for deploying my application.

    My application has four project that needs to be hosted separately and all the project has some external files which is not directly referred into the project.

    For example, I have a *.bat file that needs to be run when the installer installing the files. This I have achieved using custom action. But I need to add this file also in the setup project.

    And I've some other external files also needs to be add into the setup project like (Read me..).

    I've published the project files into separate folders for the four projects and I copied the files into the setup project manually. I need to automate this process, some one please give me a solution for this.

    Used the project output (Primary output and content files), but that is not working for the external files, because I shouldn't add the external files into the project.

    If possible, give me a sample. I'm new to setup and deployment project.

    Thanks & Regards Dhilip.R

    Wednesday, August 21, 2013 2:27 AM


  • User-837620913 posted

    You have two options.

    One is to manually add the file yourself from your file system. Instructions on how to do that are here: http://my2centsontfs.blogspot.com/2012/02/add-external-exe-to-setup-and.html

    Two is to create a class library project that has your bat file, readme files, etc. and they all have the Build Action set to "Content" in the file properties (right-click the file, set Build Action to "Content" in the properties window). Then include the "Primary output and content files" from that new class library project.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 21, 2013 5:53 AM