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

Project dependencies built recursively multiple times when using MSBuild command line

    XMLWordPrintable

Details

    • Windows
    • 73329ffd0905793bd12b7d2c4823dd9cca628a97

    Description

      Given the following scenario:

      Project C depends on Project B

      Project B depends on Project A

      All projects are QtMsBuild projects.

       

      Building this in Visual Studio 2019 works fine. However, when building this with the command line, with MSBuild.exe, it results in the following build order:

      • Project A
      • Project A
      • Project B
      • Project A
      • Project B
      • Project C

      It seems that for each individual project that has to be built, its dependencies are also built. This result in dependencies being built multiple times. When projects have post-build steps, this can result in very long build times.

      This also creates problems when using the multi thread switch of MSBuild; some projects seem to get built by multiple threads at the same time, creating a lot of file access issues.

      I have attached a solution that exhibits this issue. When building with the command line

      msbuild QtTestApp.sln

      , we see the following in the output:

       

       

      Line 41:   QtProjectA.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtProjectA.dll
      Line 66:   QtProjectA.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtProjectA.dll
      Line 86:   QtProjectB.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtProjectB.dll
      Line 120:   QtProjectA.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtProjectA.dll
      Line 139:   QtProjectB.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtProjectB.dll
      Line 180:   QtTestApp.vcxproj -> C:\Code\QtTestAppIssue\Win32\Debug\QtTestApp.exe
      

       

       

       

      Attachments

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

        Activity

          People

            mecfc Miguel Costa
            sdelisle sdelisle
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes