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

Visual Studio builder task does not allow the pipe symbol to be passed in the arguments

    • Icon: Suggestion Suggestion
    • Resolution: Low Engagement
    • 4.0
    • .NET, Windows
    • Standalone Bamboo
      Windows Server 2008 R2 6.1
      JRE Version1.6.0_26-b03
    • 0
    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      When specifying a platform to build in the Visual Studio builder tasks' configuration page the parameter is not passed to further steps correctly.

      The parsing of arguments in bamboo is good, but devenv is a 'special' beast:
      1. It has parameters pairs separated by whitespace
      2. The platform to build uses the pipe symbol (what were they thinking?)

      An example: devenv Project.sln /Rebuild "Release|Any CPU"

      To get around the first issue we changed the options to: /Rebuild '"Release|Any CPU"'
      To get around the second issue we needed to modify devenvrunner.bat to add quotes to the argument if it contained a pipe character.

      I have attached our fix for the batch file.

            [BAM-9922] Visual Studio builder task does not allow the pipe symbol to be passed in the arguments

            Atlassian Update - 24 March 2025

            Hello,

            Thank you for submitting this suggestion. We appreciate you taking the time to share your ideas for improving our products, as many features and functions come from valued customers such as yourself.

            Atlassian is committed to enhancing the security and compliance of our Data Center products, with an emphasis on sustainable scalability and improving the product experience for both administrators and end-users. We periodically review older suggestions to ensure we're focusing on the most relevant feedback. This suggestion is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments. This inactivity suggests a low impact. Therefore, this suggestion is not in consideration for our future roadmap.

            Please note the comments on this thread are not being monitored.

            You can read more about our approach to highly voted suggestions here and how we prioritize what to implement here.

            To learn more about our recent investments in Bamboo Data Center, please check our public roadmap.

            Kind regards,
            Bamboo Data Center

            Ishwinder Kaur added a comment - Atlassian Update - 24 March 2025 Hello, Thank you for submitting this suggestion. We appreciate you taking the time to share your ideas for improving our products, as many features and functions come from valued customers such as yourself. Atlassian is committed to enhancing the security and compliance of our Data Center products, with an emphasis on sustainable scalability and improving the product experience for both administrators and end-users. We periodically review older suggestions to ensure we're focusing on the most relevant feedback. This suggestion is being closed due to a lack of engagement in the last four years , including no new watchers, votes, or comments. This inactivity suggests a low impact. Therefore, this suggestion is not in consideration for our future roadmap. Please note the comments on this thread are not being monitored. You can read more about our approach to highly voted suggestions here and how we prioritize what to implement here. To learn more about our recent investments in Bamboo Data Center, please check our public roadmap . Kind regards, Bamboo Data Center

            Norbert added a comment -

            @Goldpitcher: I suggest using the MSBUILD task instead of the VStudio.
            Here you can manually set the commandline parameters
            We use for our x64 build the following Options
            /t:Rebuild /m /p:Configuration=Release /p:Platform="x64"
            and you don't have problem with the still broken x64 Visual Studio task

            Norbert added a comment - @Goldpitcher: I suggest using the MSBUILD task instead of the VStudio. Here you can manually set the commandline parameters We use for our x64 build the following Options /t:Rebuild /m /p:Configuration=Release /p:Platform="x64" and you don't have problem with the still broken x64 Visual Studio task

            Bill Tutt added a comment -

            Looking at the .net plugin source history it was fixed for version 3.9 of the .net plugin on 8/7/2012.

            Bill Tutt added a comment - Looking at the .net plugin source history it was fixed for version 3.9 of the .net plugin on 8/7/2012.

            Hi,

            This is Luke from Korean partner, Goldpitcher.
            One of our custoemr has the same issue but they said it is occurring only with 64 bit build under Bamboo 4.3.3 (dotnet plugins 3.5).

            Is this issue is fixed in Bamboo 5.x version (dotnet plugin 5.0.1) ?

            Please let me know.

            Cheers,
            Luke

            Luke [Goldpitcher] added a comment - Hi, This is Luke from Korean partner, Goldpitcher. One of our custoemr has the same issue but they said it is occurring only with 64 bit build under Bamboo 4.3.3 (dotnet plugins 3.5). Is this issue is fixed in Bamboo 5.x version (dotnet plugin 5.0.1) ? Please let me know. Cheers, Luke

            The pipe was working just fine in version 3.4, but now it is broken again in version 3.5. There was a one line change to devenvrunner.bat in the 3.5 version.

            Version 3.4 contains: echo "%~1" | findstr "|"
            Version 3.5 contains: echo "%~1" | findstr /r /c:". ."

            Brian Crosen added a comment - The pipe was working just fine in version 3.4, but now it is broken again in version 3.5. There was a one line change to devenvrunner.bat in the 3.5 version. Version 3.4 contains: echo "%~1" | findstr "|" Version 3.5 contains: echo "%~1" | findstr /r /c:". ."

            Thanks for that Norbert.

            James Dumay added a comment - Thanks for that Norbert.

            Norbert added a comment -

            not 100 % sure
            but it seems like a problem with a "variable/value" substitution I played around with different numbers ob escape character '^',

            I don't think this problem can be solved generically with batch files because cmd.exe is very choosy interpreting the parameters (so you probably MUST use quotation marks or MUST NOT and so on...
            I suggest using something different like .vbs or similar to run the command.

            as already mentioned I have a workaround by using a "script" task to call the command direct, without the devenvrunner.bat
            Probably a good solution would be to "simplify" the batch file and do the whole parameter preparation in the JAVA part ?

            Norbert added a comment - not 100 % sure but it seems like a problem with a "variable/value" substitution I played around with different numbers ob escape character '^', I don't think this problem can be solved generically with batch files because cmd.exe is very choosy interpreting the parameters (so you probably MUST use quotation marks or MUST NOT and so on... I suggest using something different like .vbs or similar to run the command. as already mentioned I have a workaround by using a "script" task to call the command direct, without the devenvrunner.bat Probably a good solution would be to "simplify" the batch file and do the whole parameter preparation in the JAVA part ?

            Hi Norbert,

            Thanks for verifying. Do you know what the problem specifically is with the devrunner.bat?

            Thanks
            James

            James Dumay added a comment - Hi Norbert, Thanks for verifying. Do you know what the problem specifically is with the devrunner.bat? Thanks James

            Norbert added a comment -

            2 days ago I updated to Bamboo 4.0 so yes Plugin 3.5 is installed
            Atlassian Bamboo .NET Plugin 3.5

            But I also looked into this topic, the problem lies within the "devrunner.bat"

            Norbert added a comment - 2 days ago I updated to Bamboo 4.0 so yes Plugin 3.5 is installed Atlassian Bamboo .NET Plugin 3.5 But I also looked into this topic, the problem lies within the "devrunner.bat"

            Hi Norbert,

            Can you confirm that the right version of the plugin, 3.5, is active by looking for the plugin in the Plugin Manager (accessible via the administration screen)?

            If everything looks ok, ill schedule this to be looked at again.

            Sorry for the hold up!

            Thanks
            James

            James Dumay added a comment - Hi Norbert, Can you confirm that the right version of the plugin, 3.5, is active by looking for the plugin in the Plugin Manager (accessible via the administration screen)? If everything looks ok, ill schedule this to be looked at again. Sorry for the hold up! Thanks James

            Norbert added a comment -

            @Piotr thanks, i updated the plugin..
            But the bug is still not fixed!

            Starting task 'Build ICOS Framework - x64' of type 'com.atlassian.bamboo.plugin.dotnet:devenv'

             
            Beginning to execute external process for build 'ICOS - playing_plan - Default Job'
            ... running command line:
            C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat
            C:\bamboo\bamboo-home\xml-data\build-dir\ICOS-T1-JOB1\icos
            C:\Programme\Microsoft Visual Studio 8
            x86_amd64
            icos.sln
            /build
            "Release|x64"
            ... in: C:\bamboo\bamboo-home\xml-data\build-dir\ICOS-T1-JOB1\icos
            

            "C:\Programme\Microsoft Visual Studio 8"
            Der Befehl "x64" ist entweder falsch geschrieben oder
            konnte nicht gefunden werden.

            The last sentence is in German, translated it would be
            'x64' is not recognized as an internal or external command,
            operable program or batch file.

            Norbert added a comment - @Piotr thanks, i updated the plugin.. But the bug is still not fixed! Starting task 'Build ICOS Framework - x64' of type 'com.atlassian.bamboo.plugin.dotnet:devenv' Beginning to execute external process for build 'ICOS - playing_plan - Default Job' ... running command line: C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat C:\bamboo\bamboo-home\xml-data\build-dir\ICOS-T1-JOB1\icos C:\Programme\Microsoft Visual Studio 8 x86_amd64 icos.sln /build "Release|x64" ... in: C:\bamboo\bamboo-home\xml-data\build-dir\ICOS-T1-JOB1\icos "C:\Programme\Microsoft Visual Studio 8" Der Befehl "x64" ist entweder falsch geschrieben oder konnte nicht gefunden werden. The last sentence is in German, translated it would be 'x64' is not recognized as an internal or external command, operable program or batch file.

            PiotrA added a comment -

            Norbert, please try this:

            • grab the atlassian-bamboo-plugin-dotnet.jar of version 3.4 or 3.5 from Plugin Site (I'm not sure if 3.5 is working with Bamboo 3.4 - maybe it is).
            • put it into your BAMBOO/webapp/WEB-INF/lib directory (note you should remove your atlassian-bamboo-plugin-dotnet-3.3.jar from that folder)
            • restart your Bamboo instance

            PiotrA added a comment - Norbert, please try this: grab the atlassian-bamboo-plugin-dotnet.jar of version 3.4 or 3.5 from Plugin Site (I'm not sure if 3.5 is working with Bamboo 3.4 - maybe it is). put it into your BAMBOO/webapp/WEB-INF/lib directory (note you should remove your atlassian-bamboo-plugin-dotnet-3.3.jar from that folder) restart your Bamboo instance

            Norbert added a comment -

            I did that but as you see in the bottom there is also a comment that installing a version 1 plugin is not explained in this artikel...

            Norbert added a comment - I did that but as you see in the bottom there is also a comment that installing a version 1 plugin is not explained in this artikel...

            Sorry about that. Follow this guide to install a Plugin.

            Thanks
            James

            James Dumay added a comment - Sorry about that. Follow this guide to install a Plugin . Thanks James

            Norbert added a comment -

            And if I look on the Plugin Site There is nothing explained how to install it manually
            little bit confused

            Norbert added a comment - And if I look on the Plugin Site There is nothing explained how to install it manually little bit confused

            Norbert added a comment -

            Sorry but I have to dissent but if I try to update via Pluginmanager i get the following (Bamboo 3.3)

            The plugin https://plugins.atlassian.com/download/plugins/com.atlassian.bamboo.plugin.dotnet/version/7?from=upm is a version 1 plugin. Version 1 plugins cannot be dynamically installed. For more information on installing version 1 plugins see the UPM documentation.

            Norbert added a comment - Sorry but I have to dissent but if I try to update via Pluginmanager i get the following (Bamboo 3.3) The plugin https://plugins.atlassian.com/download/plugins/com.atlassian.bamboo.plugin.dotnet/version/7?from=upm is a version 1 plugin. Version 1 plugins cannot be dynamically installed. For more information on installing version 1 plugins see the UPM documentation.

            Norbert,

            We have made the fix available for customers using Bamboo 3.3 and later from the plugin exchange. You can also upgrade this plugin inside Bamboo from the Plugin Manager in the administration interface (easier).

            Thanks
            James

            James Dumay added a comment - Norbert, We have made the fix available for customers using Bamboo 3.3 and later from the plugin exchange . You can also upgrade this plugin inside Bamboo from the Plugin Manager in the administration interface (easier). Thanks James

            Bamboo 4.0 will be released this week, it will contain the fix. I think you'll even be able to use the same plugin that 4.0 uses in 3.4, if you don't want to upgrade.

            Przemek Bruski added a comment - Bamboo 4.0 will be released this week, it will contain the fix. I think you'll even be able to use the same plugin that 4.0 uses in 3.4, if you don't want to upgrade.

            Norbert added a comment -

            Is it possible to get the solution for testing?

            Norbert added a comment - Is it possible to get the solution for testing?

            Norbert added a comment -

            Forget to mention
            using Windows XP SP 3 Professional (german)
            don't know if this also happens on Windows Vista/7 or other versions ...

            Norbert added a comment - Forget to mention using Windows XP SP 3 Professional (german) don't know if this also happens on Windows Vista/7 or other versions ...

            Norbert added a comment -

            Hello
            The problem is not in the batch file but in the call to the batchfile...
            I tried the call mentionend above on the commandline on the buildmachine
            Not working call -> I receive command x64 is not support command (the shell wanted use the pipe operator

            >devenvrunner.bat "C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX" "C:\Programme\Microsoft Visual Studio 8" "x86_amd64" "XXXX.sln" "/build Release|x64"

            working call, the red marked quotes (above) are different

            >devenvrunner.bat "C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX" "C:\Programme\Microsoft Visual Studio 8" "x86_amd64" "XXXX.sln /build Release|x64"

            Also I found a different problem in your devenvrunner script
            the command cd doesn't change the drive, so this only works if the devenrunner.bat is on the same drive then your build directory
            to change this, just pass the parameter /d Microsoft Dokumentation

            Norbert added a comment - Hello The problem is not in the batch file but in the call to the batchfile... I tried the call mentionend above on the commandline on the buildmachine Not working call -> I receive command x64 is not support command (the shell wanted use the pipe operator >devenvrunner.bat "C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX" "C:\Programme\Microsoft Visual Studio 8" "x86_amd64" "XXXX.sln " " /build Release|x64" working call, the red marked quotes (above) are different >devenvrunner.bat "C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX" "C:\Programme\Microsoft Visual Studio 8" "x86_amd64" "XXXX.sln /build Release|x64" Also I found a different problem in your devenvrunner script the command cd doesn't change the drive, so this only works if the devenrunner.bat is on the same drive then your build directory to change this, just pass the parameter /d Microsoft Dokumentation

            Adam Woods added a comment -

            Hi Norbert,

            What exactly is the error you are getting now then? If you are getting the double quotes included like your second example then you should no longer be experiencing the "The command "x64" is spelled wrong or could not be found" error.

            If you're still getting the same error, then it's likely that the version of the plugin you have does not have the fix to the devenvrunner batch file.

            Adam Woods added a comment - Hi Norbert, What exactly is the error you are getting now then? If you are getting the double quotes included like your second example then you should no longer be experiencing the "The command "x64" is spelled wrong or could not be found" error. If you're still getting the same error, then it's likely that the version of the plugin you have does not have the fix to the devenvrunner batch file.

            Norbert added a comment -

            Hi

            I change it to
            /build '"Release|x64"'
            nearly the same result, at least the server is not swalloing the double quote
            but nevertheless its not working
            without the extra quote I get the following

            Beginning to execute external process for build 'ICOS - playing_plan - Default Job'
            ... running command line:
            C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat
            C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX
            C:\Programme\Microsoft Visual Studio 8
            x86_amd64
            XXXX.lsn
            /build
            Release|x64
            ... in: C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX

            Beginning to execute external process for build 'ICOS - playing_plan - Default Job'
            ... running command line:
            C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat
            C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX
            C:\Programme\Microsoft Visual Studio 8
            x86_amd64
            XXXX.lsn
            /build
            "Release|x64"
            ... in: C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX

            Norbert added a comment - Hi I change it to /build '"Release|x64"' nearly the same result, at least the server is not swalloing the double quote but nevertheless its not working without the extra quote I get the following Beginning to execute external process for build 'ICOS - playing_plan - Default Job' ... running command line: C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX C:\Programme\Microsoft Visual Studio 8 x86_amd64 XXXX.lsn /build Release|x64 ... in: C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX Beginning to execute external process for build 'ICOS - playing_plan - Default Job' ... running command line: C:\bamboo\bamboo-home\DotNetSupport\devenvrunner.bat C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX C:\Programme\Microsoft Visual Studio 8 x86_amd64 XXXX.lsn /build " Release|x64 " ... in: C:\bamboo\bamboo-home\xml-data\build-dir\XXXX\XXXX

            Hi Norbert,

            Are you enclosing the double quotes with single quotes like this?

            >>> To get around the first issue we changed the options to: /Rebuild '"Release|Any CPU"'

            My understanding is that Bamboo will strip the double quotes unless they appear at the start and end of the arguments.
            ie. "All arguements" will not strip but All "arguments" will.

            It would be nice to not have to escape the double quotes though, can someone confirm that my understanding above is correct?

            Adam Woods added a comment - Hi Norbert, Are you enclosing the double quotes with single quotes like this? >>> To get around the first issue we changed the options to: /Rebuild '"Release|Any CPU"' My understanding is that Bamboo will strip the double quotes unless they appear at the start and end of the arguments. ie. "All arguements" will not strip but All "arguments" will. It would be nice to not have to escape the double quotes though, can someone confirm that my understanding above is correct?

            Norbert added a comment -

            I use Bamboo 3.4, which already have this plug-in
            -> does not solve the problem

            Norbert added a comment - I use Bamboo 3.4, which already have this plug-in -> does not solve the problem

            James Dumay added a comment - - edited

            Stefan, add the new version of the .NET plugin to https://plugins.atlassian.com/plugin/details/43168 so people can get around this bug without upgrading their whole instance

            James Dumay added a comment - - edited Stefan, add the new version of the .NET plugin to https://plugins.atlassian.com/plugin/details/43168 so people can get around this bug without upgrading their whole instance

            Norbert added a comment -

            related to this bug, support case..
            BSP-6512
            Bamboo looks like it's swallowing the double quote, because even if no space is in the text,
            i get a complain "Der Befehl "x64" ist entweder falsch geschrieben oder konnte nicht gefunden werden." (English translation: "The command "x64" is spelled wrong or could not be found.")

            Norbert added a comment - related to this bug, support case.. BSP-6512 Bamboo looks like it's swallowing the double quote, because even if no space is in the text, i get a complain "Der Befehl "x64" ist entweder falsch geschrieben oder konnte nicht gefunden werden." (English translation: "The command "x64" is spelled wrong or could not be found.")

            PiotrA added a comment -

            Can we make sure we update PAC when this is completed?

            James, what do you mean? I can't find the Bamboo-dotnet-plugin available on PAC (instead it is bundled with Bamboo application) - so what do you need to be updated on PAC?

            PiotrA added a comment - Can we make sure we update PAC when this is completed? James, what do you mean? I can't find the Bamboo-dotnet-plugin available on PAC (instead it is bundled with Bamboo application) - so what do you need to be updated on PAC?

            Can we make sure we update PAC when this is completed?

            James Dumay added a comment - Can we make sure we update PAC when this is completed?

            stoj added a comment -

            We're looking forward to this fix

            stoj added a comment - We're looking forward to this fix

            Adam Woods added a comment -

            Sounds good to me.

            Adam Woods added a comment - Sounds good to me.

            PiotrA added a comment -

            Is it ok to incorporate the attached devenvrunner.bat into the Bamboo-dotnet-plugin codebase?

            Adam? Any objections?

            PiotrA added a comment - Is it ok to incorporate the attached devenvrunner.bat into the Bamboo-dotnet-plugin codebase? Adam? Any objections?

            AntonA added a comment -

            Thanks for submitting your fix to us!

            AntonA added a comment - Thanks for submitting your fix to us!

              Unassigned Unassigned
              71b016cc8b3b Adam Woods
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified