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

Change assembly version is adding ? char at the beginning of the AssemblyInfo.cs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The plugin is adding a "?" char to all AssemblyInfo.cs files,
      Ex.
      ?using System.Reflection;
      using System.Runtime.CompilerServices;
      using System.Runtime.InteropServices;

      // General Information about an assembly is controlled through the following
      // set of attributes. Change these attribute values to modify the information

      It do change the assembyVersion line correctly
      [assembly: AssemblyVersion("4.6.7.1")]

      But the build is failing because the ? at the beginning of the file

        Attachments

          Issue Links

            Activity

            eyzenm Eyzen M. Kim created issue -
            Hide
            eyzenm Eyzen M. Kim added a comment -

            I'm using change-assembly-version-plugin 1.5.1

            Show
            eyzenm Eyzen M. Kim added a comment - I'm using change-assembly-version-plugin 1.5.1
            Hide
            bertouttier Bert Outtier added a comment -

            Same issue here.
            change-assembly-version-plugin 1.5.1
            Linux jenkins master
            Windows 8.1 build node.

            Show
            bertouttier Bert Outtier added a comment - Same issue here. change-assembly-version-plugin 1.5.1 Linux jenkins master Windows 8.1 build node.
            steph7308 Steph B made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            steph7308 Steph B added a comment - - edited

            Same issue here.
            Solution can't be built due this extra '?' char.

            change-assembly-version-plugin 1.5.1
            Windows Server 2012 R2 build slave

            Show
            steph7308 Steph B added a comment - - edited Same issue here. Solution can't be built due this extra '?' char. change-assembly-version-plugin 1.5.1 Windows Server 2012 R2 build slave
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 173080 ] JNJira + In-Review [ 184922 ]
            Hide
            simon_so simon so added a comment -

            Same here

            change-assembly-version-plugin 1.5.1
            Slave
            Windows 10 build node

            Show
            simon_so simon so added a comment - Same here change-assembly-version-plugin 1.5.1 Slave Windows 10 build node
            Hide
            steph7308 Steph B added a comment -

            Don't know why it's so long for a fix !
            Here a small workaround :

            • use the plugin as is.
            • to remove the extra character i use the following job step :
              Execute Window Batch command :
              for /f %%f in ('dir /s /b AssemblyInfo.cs') do sed -i '1s/.//' %%f

            Then the build is OK.
            Hope it will help.

            Regards.

            Show
            steph7308 Steph B added a comment - Don't know why it's so long for a fix ! Here a small workaround : use the plugin as is. to remove the extra character i use the following job step : Execute Window Batch command : for /f %%f in ('dir /s /b AssemblyInfo.cs') do sed -i '1s/.//' %%f Then the build is OK. Hope it will help. Regards.
            mdkf Michael Fowler made changes -
            Link This issue duplicates JENKINS-25476 [ JENKINS-25476 ]
            Show
            tjormola tjormola added a comment - Proposed fix at https://github.com/jenkinsci/change-assembly-version-plugin/pull/10
            Hide
            cpozdolski Connor P added a comment - - edited

            Had the same issue on plugin version 1.5.1, Windows Server 2012 R2 build slave.

            Here's a variant workaround with no external dependencies (e.g. sed). Worked on Windows Server 2012 R2.

            Windows Powershell

            gci -recurse -filter "AssemblyInfo.cs" | %{ (gc $_.fullname) -replace '\?' | Set-content $_.fullname }
            
            Show
            cpozdolski Connor P added a comment - - edited Had the same issue on plugin version 1.5.1, Windows Server 2012 R2 build slave. Here's a variant workaround with no external dependencies (e.g. sed). Worked on Windows Server 2012 R2. Windows Powershell gci -recurse -filter "AssemblyInfo.cs" | %{ (gc $_.fullname) -replace '\?' | Set-content $_.fullname }
            Hide
            luminary Blair Stewart added a comment -

            This is still a problem, thank you Connor P your solution saved me!

            Show
            luminary Blair Stewart added a comment - This is still a problem, thank you Connor P your solution saved me!
            Hide
            tzadikv Tzadik Vanderhoof added a comment -

            The character you are seeing is the UTF-8 BOM.  This is caused by a bug in Visual Studio. See: https://developercommunity.visualstudio.com/content/problem/28254/visual-studio-writes-bom-for-utf8-files.html .  Seems like it is fixed by an update.

            Show
            tzadikv Tzadik Vanderhoof added a comment - The character you are seeing is the UTF-8 BOM.  This is caused by a bug in Visual Studio. See: https://developercommunity.visualstudio.com/content/problem/28254/visual-studio-writes-bom-for-utf8-files.html .  Seems like it is fixed by an update.
            Hide
            tzadikv Tzadik Vanderhoof added a comment - - edited

            There is already a pull request against the plugin that fixes this but it was rejected with no explanation:

            https://github.com/jenkinsci/change-assembly-version-plugin/pull/11

            Show
            tzadikv Tzadik Vanderhoof added a comment - - edited There is already a pull request against the plugin that fixes this but it was rejected with no explanation: https://github.com/jenkinsci/change-assembly-version-plugin/pull/11
            Hide
            dwright Debbie Wright added a comment -

            Is there a plan to Fix this? with workaround works, Its just cumbersome

            Show
            dwright Debbie Wright added a comment - Is there a plan to Fix this? with workaround works, Its just cumbersome
            Hide
            hsantana29 Hector Santana added a comment -

            This was merged as part of https://github.com/jenkinsci/change-assembly-version-plugin/pull/11. Now we just need to wait for the next release. Probably v1.11

            Show
            hsantana29 Hector Santana added a comment - This was merged as part of https://github.com/jenkinsci/change-assembly-version-plugin/pull/11.  Now we just need to wait for the next release. Probably v1.11

              People

              • Assignee:
                sankethpb Sanketh PB
                Reporter:
                eyzenm Eyzen M. Kim
              • Votes:
                5 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: