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

Incompatibility of MSBuild and Copy Artifact Plugins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • msbuild-plugin
    • None
    • Jenkins 1.466 on Windows 7 Professional (64-bit)

      There is an incompatibility when attempting to build a project that uses both the MSBuild and Copy Artifact plugins, where there is a Build Selector parameter used to specify which build to copy files from. It appears that the value of the Build Selector parameter is passed to MSBuild as XML and is not being placed in quotation marks, causing Windows to interpret the less than and greater than signs as redirecting standard input and output to files that don't exist and leading to failure. The error message received as follows:

      Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
      Executing command: cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release /p:BUILD_VERSION=2.1;BUILD_CHANGELIST=;THIRDPARTY_BUILD=<StatusBuildSelector/>;THIRDPARTY64_BUILD=<StatusBuildSelector/> trunk/build/omall.sln && exit %%ERRORLEVEL%%
      [openstage_release] $ cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release /p:BUILD_VERSION=2.1;BUILD_CHANGELIST=;THIRDPARTY_BUILD=<StatusBuildSelector/>;THIRDPARTY64_BUILD=<StatusBuildSelector/> trunk/build/omall.sln && exit %%ERRORLEVEL%%
      The system cannot find the file specified.
      Build step 'Build a Visual Studio project or solution using MSBuild.' marked build as failure
      Archiving artifacts
      Recording test results
      Finished: FAILURE

      This error occurs when I set the value of the Build Selector parameter to the latest successful build. When I set it to use a specific build, the XML contains spaces, which appears to cause the plugin to place the entire /p parameter with the build parameters in quotation marks, preventing the problem in this case.

            kdsweeney kdsweeney
            dgolub David Golub
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: