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

MSBuild parser does not support multi-language output

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • warnings-plugin
    • None
    • 4.40

      I have a german version of Visual Studio 2010 Premium and also a .NET 4.5.1 Language Pack German installed.
      This leads to the fact that all Visual Studio output is in german and that the Regex Pattern of the MSBuild parser does not find "Warnung" as the pattern is just matching "warning".

      Then I deinstalled the .NET 4.5.1 Language Pack German, in order to see what influence this language pack has on the Visual Studio output. The consequence was that I now have a mixed output. Some messages are in german and some are in english.

      The question is how to support multiple languages for the MSBuild parser?

          [JENKINS-22264] MSBuild parser does not support multi-language output

          Ulli Hafner added a comment -

          The best thing would be to adapt the regular expression. Interested in providing a pull request?

          Ulli Hafner added a comment - The best thing would be to adapt the regular expression. Interested in providing a pull request?

          I tried installing a language pack to test this, but it looks like only the warning message (and not its severity) was localized to german in my environment.

          • Microsoft (R) Build Engine version 12.0.31101.0
          • Microsoft .NET Framework, version 4.0.30319.34209
          /p:preferreduilang=en-US
          CompilerWarningTests.cs(11,35): warning CS0067: The event 'Misc.CompilerWarningTests.UnusedEvent' is never used [I:\CS\ResharperDemo\Misc\Misc.csproj]
          
          /p:preferreduilang=de-DE
           CompilerWarningTests.cs(11,35): warning CS0067: Das Ereignis 'Misc.CompilerWarningTests.UnusedEvent' wird nie verwendet. [I:\CS\ResharperDemo\Misc\Misc.csproj]
          

          Stefan Landström added a comment - I tried installing a language pack to test this, but it looks like only the warning message (and not its severity) was localized to german in my environment. Microsoft (R) Build Engine version 12.0.31101.0 Microsoft .NET Framework, version 4.0.30319.34209 /p:preferreduilang=en-US CompilerWarningTests.cs(11,35): warning CS0067: The event 'Misc.CompilerWarningTests.UnusedEvent' is never used [I:\CS\ResharperDemo\Misc\Misc.csproj] /p:preferreduilang=de-DE CompilerWarningTests.cs(11,35): warning CS0067: Das Ereignis 'Misc.CompilerWarningTests.UnusedEvent' wird nie verwendet. [I:\CS\ResharperDemo\Misc\Misc.csproj]

          Ulli Hafner added a comment -

          That means this issue is not reproducable anymore?

          Ulli Hafner added a comment - That means this issue is not reproducable anymore?

          Perhaps the "Warnung" output came from another tool run during the build?

          My understanding is that the output category should not be localized in order for it to be picked up by MSBuild.

          For future reference it can also be worth mentioning that Microsoft has now open-sourced MSBuild, so it's possible to see their current implementation for how this is handled:
          https://github.com/Microsoft/msbuild/blob/master/src/Shared/CanonicalError.cs

          Stefan Landström added a comment - Perhaps the "Warnung" output came from another tool run during the build? My understanding is that the output category should not be localized in order for it to be picked up by MSBuild. https://msdn.microsoft.com/en-us/library/yxkt8b26.aspx http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx For future reference it can also be worth mentioning that Microsoft has now open-sourced MSBuild, so it's possible to see their current implementation for how this is handled: https://github.com/Microsoft/msbuild/blob/master/src/Shared/CanonicalError.cs

            Unassigned Unassigned
            mirumpf Michael Rumpf
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: