• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Any MSBuild Experts?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Any MSBuild Experts?

    Trying to call a solutions file with several targets only two of which I need to call, however in someones infinite wisdom they have put a " " in one of the project name which running MSBuild from the command line will not accept with the /target switch.

    Does any know either how to call a target with a space in its project name, or alternatively, if its possible to list projects that I want to EXCLUDE rather than include when running from the command line

    (Suggestions to beat the code monkeys around the head will be welcomed)
    Originally posted by Stevie Wonder Boy
    I can't see any way to do it can you please advise?

    I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

    #2
    Originally posted by SimonMac View Post
    Trying to call a solutions file with several targets only two of which I need to call, however in someones infinite wisdom they have put a " " in one of the project name which running MSBuild from the command line will not accept with the /target switch.

    Does any know either how to call a target with a space in its project name, or alternatively, if its possible to list projects that I want to EXCLUDE rather than include when running from the command line

    (Suggestions to beat the code monkeys around the head will be welcomed)
    can you not quote the project name?

    /target "project name"
    Coffee's for closers

    Comment


      #3
      Originally posted by Spacecadet View Post
      can you not quote the project name?

      /target "project name"
      Already tried that, as well as project%20name (I was running out of ideas)
      Originally posted by Stevie Wonder Boy
      I can't see any way to do it can you please advise?

      I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

      Comment


        #4
        Originally posted by SimonMac View Post
        Already tried that, as well as project%20name (I was running out of ideas)
        are you specifying the full path for the project name?
        you might need to double up the "\"'s

        "c:\\SimonMac\\Projects\\Badly named project.proj"
        Coffee's for closers

        Comment


          #5
          Originally posted by Spacecadet View Post
          are you specifying the full path for the project name?
          you might need to double up the "\"'s

          "c:\\SimonMac\\Projects\\Badly named project.proj"
          I am specifying a solution file (which it is finding), in the file there is 6 projects, if I specify a target without spaces it is compiling, if I specify the target with the space it is failing saying it can't find it
          Originally posted by Stevie Wonder Boy
          I can't see any way to do it can you please advise?

          I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

          Comment


            #6
            If it was Unix you could escape the space....

            Comment


              #7
              Originally posted by SimonMac View Post
              Already tried that, as well as project%20name (I was running out of ideas)
              We had the same thing and tried to double up our "\"'s and that fixed it. We then encountered it on a nother project (same team had developed it) but didnt work, we had to use "/"

              Comment


                #8
                There's no "\" to double up:

                Code:
                msbuild.exe %applicationname%.sln /target:Transformations
                This works

                Code:
                msbuild.exe %applicationname%.sln /target:"Solution Items"
                And various variations does not work
                Originally posted by Stevie Wonder Boy
                I can't see any way to do it can you please advise?

                I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

                Comment


                  #9
                  Think msbuild uses xml so the " will be reserved, try using &quot
                  Last edited by Ketchup; 15 August 2012, 14:08. Reason: typo

                  Comment


                    #10
                    Originally posted by SimonMac View Post
                    There's no "\" to double up:

                    Code:
                    msbuild.exe %applicationname%.sln /target:Transformations
                    This works

                    Code:
                    msbuild.exe %applicationname%.sln /target:"Solution Items"
                    And various variations does not work
                    how about  

                    Code:
                    msbuild.exe %applicationname%.sln /target:Solution Items
                    Coffee's for closers

                    Comment

                    Working...
                    X