Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-11561

Auto removal of quotes from MSBuild options resulting in errors

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.8
    • 5.6.0
    • Windows
    • None

      During the specification of the build task we can specify something of the nature:

      /t:Release /p:BuildVersion="1.0.0.${bamboo.buildNumber}" /p:ProductsToRelease="JIRA;Bamboo;Fisheye"

      During execution of the task, Bamboo takes off the quotes around the property value which cause the build to fail because the semicolon in this case are used as property separator and hence the remaining part will be an invalid expression as reproetd in the microsoft KB article at http://msdn.microsoft.com/en-us/library/xx2ke5d2%28v=vs.80%29.aspx. Here is a sample of the build log:

      MSBUILD : error MSB1006: Property is not valid.
      

      If the quotes were not removed, all the three options will be considered as values of the property ProductsToRelease

            [BAM-11561] Auto removal of quotes from MSBuild options resulting in errors

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1441861 ] New: JAC Bug Workflow v3 [ 3382999 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Bamboo Workflow 2016 v1 [ 1418204 ] New: Bamboo Workflow 2016 v1 - Restricted [ 1441861 ]
            Marek Went (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2014 v2 [ 608668 ] New: Bamboo Workflow 2016 v1 [ 1418204 ]

            This workaround

            wrapper.java.additional.3=-Dbamboo.plugin.dotnet.msbuild.useResponseFile

            May work for MSBuild, but it doesn't work for MSDeploy at all. (We have it installed as a Command executable)

            Swift Capital added a comment - This workaround wrapper.java.additional.3=-Dbamboo.plugin.dotnet.msbuild.useResponseFile May work for MSBuild, but it doesn't work for MSDeploy at all. (We have it installed as a Command executable)
            Ranjith Ezhilmaran (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 81941 ] New: This issue links to "Page (Extranet)" [ 81941 ]
            Paul Kelcey (Inactive) made changes -
            Remote Link New: This issue links to "BDEV-8861 (Atlassian JIRA Extranet - Special Projects)" [ 102649 ]
            Deric Lee (Inactive) made changes -
            Link New: This issue relates to BAM-15879 [ BAM-15879 ]

            We've just encountered the same issue that David mentioned (we use proj files too) after upgrading from 5.6.2 to 5.8.1. Any word on a fix for this?

            Chas Berndt added a comment - We've just encountered the same issue that David mentioned (we use proj files too) after upgrading from 5.6.2 to 5.8.1. Any word on a fix for this?

            I upgraded Bamboo to v5.8.0 from v5.3.3 on 17 March 2015. I have only just found that I have a number of builds that now fail with MSB1008: Only one project can be specified. Many of these builds have requirements rather more complex that simply building a .sln file so we use MSBuild targets files frequently. The circumstances described in this issue and in the comments implies that it is triggered when passing an MSBuild parameter with a space in it in the {{Options }} field of the job.
            What we have found is that the path to the Project File field of the job is also affected. If this field also contains a path, none of the directories in that path can contain a space.
            The only option for us was to rename any directories in any paths to targets files that contained spaces. This was unfortunate because there were many and all were under source control which meant wholesale copying, renaming and deleting of numerous paths.

            David FALLAS added a comment - I upgraded Bamboo to v5.8.0 from v5.3.3 on 17 March 2015. I have only just found that I have a number of builds that now fail with MSB1008: Only one project can be specified . Many of these builds have requirements rather more complex that simply building a .sln file so we use MSBuild targets files frequently. The circumstances described in this issue and in the comments implies that it is triggered when passing an MSBuild parameter with a space in it in the {{Options }} field of the job. What we have found is that the path to the Project File field of the job is also affected. If this field also contains a path, none of the directories in that path can contain a space. The only option for us was to rename any directories in any paths to targets files that contained spaces. This was unfortunate because there were many and all were under source control which meant wholesale copying, renaming and deleting of numerous paths.
            Cintia Calvo (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 81941 ] New: This issue links to "Page (Extranet)" [ 81941 ]

              pwatson paulwatson (Inactive)
              smaiyaki Sultan Maiyaki (Inactive)
              Affected customers:
              20 This affects my team
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: