Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5552

MSBuild plugin creates malformed command line

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: msbuild-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2003 (All SP's)
    • Similar Issues:

      Description

      Please see
      http://n4.nabble.com/MSBuild-Plugin-1-3-MSBuild-no-longer-works-tc1472772.html#a1472772
      for the initial report of the issue.

      Since version 1.3, the MSBuild plugin tries to pass build variables as arguments to MSBuild.
      The changes done to MSBuildBuilder.java in version 23118 result in a malformed command line that is then used to start MSBuild, resulting in error messages like:

      MSBUILD : error MSB1006: Property is not valid.
      Switch: 2

      The issue practically renders MSBuild useless. All our native builds ceased to work after upgrade of the plugin.
      The issue did not exist in version 1.2 of the plugin.

        Attachments

          Issue Links

            Activity

            Hide
            agallant Andrew Gallant added a comment -

            Has there been any movement on this? I'm having to add /build "Release|Win32" and the tokenizer is deleting the quotes, making the build fail.

            Show
            agallant Andrew Gallant added a comment - Has there been any movement on this? I'm having to add /build "Release|Win32" and the tokenizer is deleting the quotes, making the build fail.
            Hide
            torarvid torarvid added a comment -

            I have submitted a pull request on GitHub

            Show
            torarvid torarvid added a comment - I have submitted a pull request on GitHub
            Hide
            agallant Andrew Gallant added a comment - - edited

            It is still failing for me. Running msbuild/devenv.com I need to use /build "Release|Win32", "Release|x64", etc and the quotes are still being stripped. Here's my log output:
            c:\progra~1\micros~2.0\common7\IDE\devenv.com /build Release|Win32 C:\JENKINS\jobs\5.3W_RCIBuild\workspace\Build_Common.sln && exit %%ERRORLEVEL%%
            'Win32' is not recognized as an internal or external command

            Show
            agallant Andrew Gallant added a comment - - edited It is still failing for me. Running msbuild/devenv.com I need to use /build "Release|Win32", "Release|x64", etc and the quotes are still being stripped. Here's my log output: c:\progra~1\micros~2.0\common7\IDE\devenv.com /build Release|Win32 C:\JENKINS\jobs\5.3W_RCIBuild\workspace\Build_Common.sln && exit %%ERRORLEVEL%% 'Win32' is not recognized as an internal or external command
            Hide
            torarvid torarvid added a comment -

            @agallant Well, my fix is for the "build variables" that is passed to msbuild and not the whole command line. Not 100% sure where you supply that '/build "Release|Win32"' part of it, but that might be why.

            I think - according to the description of this issue, that it is correct to set the status to "Resolved", and maybe create a separate issue (that I admit - is very much related).

            My own itch is scratched, so I'm sorry I don't have more time right now to fix this - But I have a quick fix suggestion for you:

            Try to pass these options as '/p:Configuration=Release /p:Platform=Win32' instead of using the compound /build flag

            Show
            torarvid torarvid added a comment - @agallant Well, my fix is for the "build variables" that is passed to msbuild and not the whole command line. Not 100% sure where you supply that '/build "Release|Win32"' part of it, but that might be why. I think - according to the description of this issue, that it is correct to set the status to "Resolved", and maybe create a separate issue (that I admit - is very much related). My own itch is scratched, so I'm sorry I don't have more time right now to fix this - But I have a quick fix suggestion for you: Try to pass these options as '/p:Configuration=Release /p:Platform=Win32' instead of using the compound /build flag
            Hide
            agallant Andrew Gallant added a comment - - edited

            I created new msbuild instances in Jenkins each with their own command line flag and it's still stripping out the quotes. Off to batch-ville.

            I did open a new case regarding this.

            AJ

            Show
            agallant Andrew Gallant added a comment - - edited I created new msbuild instances in Jenkins each with their own command line flag and it's still stripping out the quotes. Off to batch-ville. I did open a new case regarding this. AJ

              People

              • Assignee:
                gbois Gregory Boissinot
                Reporter:
                atticus atticus
              • Votes:
                5 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: