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

'chcp' is not recognized as an internal or external command, operable program or batch file.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: msbuild-plugin
    • Labels:
    • Environment:
      Win7 in Dutch, Jenkins v2.46, MSBuild Plugin v1.27
    • Similar Issues:

      Description

      After upgrading from MSBuild Plugin v1.26 to v1.27, all builds using MSBuild plugin failed with:

      'chcp' is not recognized as an internal or external command, operable program or batch file.

      This seems to be related to case: JENKINS-24132.

      As a work-around, i (manually) reverted to MSBuild Plugin v1.26.

      Running chcp on the same machine works, running chcp via the Jenkins script console yields the same error.
      Running chcp.com via the Jenkins script console works.

      Can we please change chcp to chcp.com?

        Attachments

          Activity

          Hide
          marshall777 Lionel Cabasson added a comment -

          Hello Shawn,

          Thanks for your feedback, I will try to take some time to do a new release with the following features :

          • an error running chcp should be ignored and not prevent msbuild from running
          • the plugin should provide an option to disable the chcp command

          Regards
          Lionel

          Show
          marshall777 Lionel Cabasson added a comment - Hello Shawn, Thanks for your feedback, I will try to take some time to do a new release with the following features : an error running chcp should be ignored and not prevent msbuild from running the plugin should provide an option to disable the chcp command Regards Lionel
          Hide
          ajitsurana Ajit Surana added a comment -

          Is this problem resolved?
          I can see exact same problem given by Build a Visual Studio project or solution using MSBuild Jenkins plugin in the slave job.

          Command:

          [Klocwork_CSharp_Project_Builder] $ cmd.exe /C " chcp 1252 && "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" /p:Configuration=Release %WORKSPACE%\KWCSharpProjectBuilder.sln " && exit %%ERRORLEVEL%%
          

          Error:

          'chcp' is not recognized as an internal or external command,
          
          Show
          ajitsurana Ajit Surana added a comment - Is this problem resolved? I can see exact same problem given by Build a Visual Studio project or solution using MSBuild Jenkins plugin in the slave job. Command: [Klocwork_CSharp_Project_Builder] $ cmd.exe /C " chcp 1252 && "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" /p:Configuration=Release %WORKSPACE%\KWCSharpProjectBuilder.sln " && exit %%ERRORLEVEL%% Error: 'chcp' is not recognized as an internal or external command,
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Marshall
          Path:
          src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java
          src/main/resources/hudson/plugins/msbuild/MsBuildBuilder/config.jelly
          http://jenkins-ci.org/commit/msbuild-plugin/78cf15892d8411edae8aded2ec13e9b12015c740
          Log:
          JENKINS-42284 Add an option to prevent chcp from being executed

          Since some users encountered an error when the plugin was running chcp
          command, this commit add a checkbox on the msbuild step allowing to
          prevent the plugin from running it.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marshall Path: src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java src/main/resources/hudson/plugins/msbuild/MsBuildBuilder/config.jelly http://jenkins-ci.org/commit/msbuild-plugin/78cf15892d8411edae8aded2ec13e9b12015c740 Log: JENKINS-42284 Add an option to prevent chcp from being executed Since some users encountered an error when the plugin was running chcp command, this commit add a checkbox on the msbuild step allowing to prevent the plugin from running it.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Marshall
          Path:
          src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java
          http://jenkins-ci.org/commit/msbuild-plugin/c1b2074190a938099e04b2cae88febee88bf32a8
          Log:
          JENKINS-42284 Improvement of chcp error handling

          The chcp command no more prevents msbuild from running in case of error.
          If the command fails, the plugin will still run msbuild so the build can
          continue.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marshall Path: src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java http://jenkins-ci.org/commit/msbuild-plugin/c1b2074190a938099e04b2cae88febee88bf32a8 Log: JENKINS-42284 Improvement of chcp error handling The chcp command no more prevents msbuild from running in case of error. If the command fails, the plugin will still run msbuild so the build can continue.
          Hide
          marshall777 Lionel Cabasson added a comment -

          Hello,

          Release 1.28 should solve the issue :

          • chcp errors no longer fail the build. If an error occured, it is ignored and msbuild is run anyway
          • a checkbox has been added on the build step configuration allowing you to prevent the plugin from running chcp (although it should not be necessary since chcp should not fail the build anymore)

          Regards
          Lionel

          Show
          marshall777 Lionel Cabasson added a comment - Hello, Release 1.28 should solve the issue : chcp errors no longer fail the build. If an error occured, it is ignored and msbuild is run anyway a checkbox has been added on the build step configuration allowing you to prevent the plugin from running chcp (although it should not be necessary since chcp should not fail the build anymore) Regards Lionel

            People

            • Assignee:
              marshall777 Lionel Cabasson
              Reporter:
              kompjoefriek Roel van Nuland
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: