Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-828

QtMsBuild error with 64-bit MSBuild

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 2.6.0 (rev.07)
    • Fix Version/s: None
    • Component/s: Qt/MSBuild
    • Labels:
      None
    • Environment:
      MSBuild 15.9.21.664 (amd64)
      MSBuild 16.7.0.37604 (amd64)
    • Platform/s:
      Windows

      Description

      While updating the QtMsBuild for our Jenkins toolchain from v2.5.2 I've noticed that using the 64-bit MSBuild binaries causes MSB3758 and MSB4175 build errors.
      When building with the 32-bit MSBuild everything works fine.

       

       

      > "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\MSBuild.exe" -t:Rebuild -p:Configuration=Debug -p:Platform=x86 Test.sln
        "D:\workspace\Test\Test.sln" (Rebuild target) (1) ->
        "D:\workspace\Test\Test.vcxproj" (Rebuild target) (13) ->
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error : The source file for this compilation can be found at: "C:\Users\jenkins\AppData\Local\Temp\95d5604c-d6c7-45c2-abd4-ac4e32a3e8ac.txt"
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error MSB3758: An error has occurred during compilation. error CS1703: An assembly with the same identity 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' was already imported. Remove one of the duplicate references.
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property.
      
      
      > "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\msbuild.exe" -t:Rebuild -p:Configuration=Debug -p:Platform=x86 Test.sln
        "D:\workspace\Test\Test.sln" (Rebuild target) (1) ->
        "D:\workspace\Test\Test.vcxproj" (Rebuild target) (13) ->
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error : The source file for this compilation can be found at: "C:\Users\jenkins\AppData\Local\Temp\aca5cb1c-33f4-4430-90fe-0c1d56232ac0.txt"
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error MSB3758: An error has occurred during compilation. warning CS1668: Invalid search path 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\VS\lib\x86' in 'LIB environment variable' -- 'The system cannot find the specified path. '.
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error MSB3758: An error has occurred during compilation. error CS1703: An assembly with the same identity 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' was already imported. Remove one of the duplicate references.
          C:\Users\jenkins\AppData\Local\QtMsBuild\qt_vars.targets(147,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property.
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            mecfc Miguel Costa
            Reporter:
            anoymouserver anoymouserver
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes