Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Where to store additional files

Where to store additional files

Scheduled Pinned Locked Moved Visual Basic
wpfcomdebuggingquestionannouncement
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mithun Shitole
    wrote on last edited by
    #1

    Hi, I'm developing an application which uses some additional files ( like images,templates etc). I have made folders in bin/debug/ dir so that i can access them relative to exe. Is this a correct way? As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also. What should be done ideally?

    Mithun Shitole "Free Your Mind" http://www.technoyaari.com

    J T T D 4 Replies Last reply
    0
    • M Mithun Shitole

      Hi, I'm developing an application which uses some additional files ( like images,templates etc). I have made folders in bin/debug/ dir so that i can access them relative to exe. Is this a correct way? As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also. What should be done ideally?

      Mithun Shitole "Free Your Mind" http://www.technoyaari.com

      J Offline
      J Offline
      Johan Hakkesteegt
      wrote on last edited by
      #2

      Ideally you add an installation / setup project to your solution. Such a project will allow you to add additional files, like drivers, images, etc., and it will allow you to determine where these files will be copied to, during installation.

      My advice is free, and you may get what you paid for.

      M 1 Reply Last reply
      0
      • J Johan Hakkesteegt

        Ideally you add an installation / setup project to your solution. Such a project will allow you to add additional files, like drivers, images, etc., and it will allow you to determine where these files will be copied to, during installation.

        My advice is free, and you may get what you paid for.

        M Offline
        M Offline
        Mithun Shitole
        wrote on last edited by
        #3

        Thanks for this quicky, I already have an installation project in solution. But if i add those files only in installation project, How can i access these files/folders while debugging my application? As my code uses path of exe+path of folder to access those files, folders must be inside application folder.

        Mithun Shitole "Free Your Mind" http://www.technoyaari.com

        1 Reply Last reply
        0
        • M Mithun Shitole

          Hi, I'm developing an application which uses some additional files ( like images,templates etc). I have made folders in bin/debug/ dir so that i can access them relative to exe. Is this a correct way? As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also. What should be done ideally?

          Mithun Shitole "Free Your Mind" http://www.technoyaari.com

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          Mithun.Shitole wrote:

          I have made folders in bin/debug/ dir so that i can access them relative to exe.

          As long as you only read these files that is acceptable. From the moment you actually need to alter (write into)/ create these files it's not, and vista won't even allow you to (well it will but it will be in the virtual drive).

          Mithun.Shitole wrote:

          need to copy all these files with dlls which i refer to bin/release directory also.

          As suggested you can do this in the setup project. Just go to where you add the exe ('application folder' if I'm not mistaken), add the folder with the correct name, add the files need into the folder. Watch out that you add at least one file to each folder created otherwise the setup sometimes doesn't create the folder, don't ask my why but its something I found out the hard way ;P

          1 Reply Last reply
          0
          • M Mithun Shitole

            Hi, I'm developing an application which uses some additional files ( like images,templates etc). I have made folders in bin/debug/ dir so that i can access them relative to exe. Is this a correct way? As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also. What should be done ideally?

            Mithun Shitole "Free Your Mind" http://www.technoyaari.com

            T Offline
            T Offline
            TheMrProgrammer
            wrote on last edited by
            #5

            Make a function: openfile(path as string) if the bin directory is in the same parent directory as the .exe file then do this

            call openfile("bin\sample.jpg")

            similarly call other files.

            TheMrProgrammer TheCalcMan: A no-mouse required Calculator supporting constant operator and visual effects Try it once, its awesome! Just 17.1 KB download. No installation required. No dlls. Just unrar and go. And its a freeware. http://www.hotlinkfiles.com/files/2642094\_kjwr0/TheCalcMan.rar

            1 Reply Last reply
            0
            • M Mithun Shitole

              Hi, I'm developing an application which uses some additional files ( like images,templates etc). I have made folders in bin/debug/ dir so that i can access them relative to exe. Is this a correct way? As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also. What should be done ideally?

              Mithun Shitole "Free Your Mind" http://www.technoyaari.com

              D Offline
              D Offline
              DoctorMick
              wrote on last edited by
              #6

              If the files are read only you should be able to include them in your VB project and set the "Copy to output directory" option to "Copy always". That way, the files will always be copied to the bin directory automatically.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups