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. Post-build event command line error

Post-build event command line error

Scheduled Pinned Locked Moved C#
questiondebugginghelp
5 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.
  • R Offline
    R Offline
    Reddy Prakash
    wrote on last edited by
    #1

    I am using the following command in the post-build event for copying the dll from the target dir to the destination copy $(TargetDir)\*.exe $(SolutionDir)\Bin\$(ConfigurationName) copy $(TargetDir)\*.exe.config $(SolutionDir)\Bin\$(ConfigurationName) when i try to compile the project i am getting the following error "Error 5 The command "copy D:\src_comp\C1\bin\Debug\\*.exe D:\src_comp\\Bin\Debug copy D:\src_comp\C2\bin\Debug\\*.exe.config D:\src_comp\\Bin\Debug" exited with code 1. CDC" Can any one tell me what is going wrong here?

    B 1 Reply Last reply
    0
    • R Reddy Prakash

      I am using the following command in the post-build event for copying the dll from the target dir to the destination copy $(TargetDir)\*.exe $(SolutionDir)\Bin\$(ConfigurationName) copy $(TargetDir)\*.exe.config $(SolutionDir)\Bin\$(ConfigurationName) when i try to compile the project i am getting the following error "Error 5 The command "copy D:\src_comp\C1\bin\Debug\\*.exe D:\src_comp\\Bin\Debug copy D:\src_comp\C2\bin\Debug\\*.exe.config D:\src_comp\\Bin\Debug" exited with code 1. CDC" Can any one tell me what is going wrong here?

      B Offline
      B Offline
      benjymous
      wrote on last edited by
      #2

      might be the double slash causing a problem try changing it to copy $(TargetDir)*.exe ...

      Help me! I'm turning into a grapefruit! Buzzwords!

      R 1 Reply Last reply
      0
      • B benjymous

        might be the double slash causing a problem try changing it to copy $(TargetDir)*.exe ...

        Help me! I'm turning into a grapefruit! Buzzwords!

        R Offline
        R Offline
        Reddy Prakash
        wrote on last edited by
        #3

        $(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.

        M B 2 Replies Last reply
        0
        • R Reddy Prakash

          $(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.

          M Offline
          M Offline
          moon_stick
          wrote on last edited by
          #4

          I've just checked one of my projects - $(TargetDir) is "c:\projects\project1\" so the trailing backslash is included. You're trying to resolve the address something like "c:\projects\project1\\*.exe" which isn't valid path. Make the change the OP stated - it should work.

          It definitely isn't definatley

          1 Reply Last reply
          0
          • R Reddy Prakash

            $(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.

            B Offline
            B Offline
            benjymous
            wrote on last edited by
            #5

            there's a double slash in the error you reported:

            Reddy Prakash wrote:

            "Error 5 The command "copy D:\src_comp\C1\bin\Debug**\\***.exe D:\src_comp\\Bin\Debug

            Help me! I'm turning into a grapefruit! Buzzwords!

            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