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. C#
  4. Visual Studio managing my project files

Visual Studio managing my project files

Scheduled Pinned Locked Moved C#
questioncsharpdatabasevisual-studiocom
9 Posts 3 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.
  • L Offline
    L Offline
    LimitedAtonement
    wrote on last edited by
    #1

    Dear Sirs, I need my project files to go to the right place. I currently have three projects. Project A depends on Projects B and C, both Class Libraries. Project B has a database file (MDB) in it, which copies properly to Project A's output (either Release or Debug \data) directory. Project C, however, the rogue, has a file in it and it copies to project C (!!)'s output folder. How do I get Project C to cooperate, and send its file (an XNA font file) to Project A working directory? I wouldn't mind so much Project C copying its Content files to its own directory, but it can't find them from there: when the program runs, Project C uses Project A's active directory, so Project C complains, I can't find my file. I look around, and in Project C's directory, there it is, but the Exception says that it's looking in Project A's active directory. I hope I have been clear enough. Thanks in advance for your help. In Christ, Aaron Laws

    In Christ, Aaron Laws http://ProCure.com

    N 1 Reply Last reply
    0
    • L LimitedAtonement

      Dear Sirs, I need my project files to go to the right place. I currently have three projects. Project A depends on Projects B and C, both Class Libraries. Project B has a database file (MDB) in it, which copies properly to Project A's output (either Release or Debug \data) directory. Project C, however, the rogue, has a file in it and it copies to project C (!!)'s output folder. How do I get Project C to cooperate, and send its file (an XNA font file) to Project A working directory? I wouldn't mind so much Project C copying its Content files to its own directory, but it can't find them from there: when the program runs, Project C uses Project A's active directory, so Project C complains, I can't find my file. I look around, and in Project C's directory, there it is, but the Exception says that it's looking in Project A's active directory. I hope I have been clear enough. Thanks in advance for your help. In Christ, Aaron Laws

      In Christ, Aaron Laws http://ProCure.com

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      In Project C's properties, go to Build Events tab and use a post-build event command to copy the files to the necessary location.


      only two letters away from being an asset

      L 1 Reply Last reply
      0
      • N Not Active

        In Project C's properties, go to Build Events tab and use a post-build event command to copy the files to the necessary location.


        only two letters away from being an asset

        L Offline
        L Offline
        LimitedAtonement
        wrote on last edited by
        #3

        Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.

        In Christ, Aaron Laws http://ProCure.com

        N A 2 Replies Last reply
        0
        • L LimitedAtonement

          Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.

          In Christ, Aaron Laws http://ProCure.com

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          I can only assume that VS know to copy the file as a dependency when you add a reference to the project. The properties of the file are probably set to copy to output.


          only two letters away from being an asset

          L 1 Reply Last reply
          0
          • L LimitedAtonement

            Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.

            In Christ, Aaron Laws http://ProCure.com

            A Offline
            A Offline
            Alan N
            wrote on last edited by
            #5

            Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.

            N L 2 Replies Last reply
            0
            • A Alan N

              Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              All well and good but this doesn't help his problem. This will place the files in the bin folder of the project, not copy them to another location, such as another project's output folder.


              only two letters away from being an asset

              1 Reply Last reply
              0
              • N Not Active

                I can only assume that VS know to copy the file as a dependency when you add a reference to the project. The properties of the file are probably set to copy to output.


                only two letters away from being an asset

                L Offline
                L Offline
                LimitedAtonement
                wrote on last edited by
                #7

                Dear Mr. Nischalke, Thanks for you help. In both projects, B and C, the files in question are set to

                Build action | Content
                Copy to output directory | True

                In Christ, Aaron Laws http://ProCure.com

                N 1 Reply Last reply
                0
                • A Alan N

                  Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.

                  L Offline
                  L Offline
                  LimitedAtonement
                  wrote on last edited by
                  #8

                  Dear Mr. N, I was very hopeful when I read this message, however, the problem-project is already marked True at the property in question. Thanks! I'll keep working on it.

                  In Christ, Aaron Laws http://ProCure.com

                  1 Reply Last reply
                  0
                  • L LimitedAtonement

                    Dear Mr. Nischalke, Thanks for you help. In both projects, B and C, the files in question are set to

                    Build action | Content
                    Copy to output directory | True

                    In Christ, Aaron Laws http://ProCure.com

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #9

                    If you want further help, drop the Mr. ;P I've used commands like this to move files within my project folder structure copy "$(TargetDir)$(TargetFileName)" "../../../Common/$(TargetFileName)"


                    only two letters away from being an asset

                    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