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

Build "Project only" triggers Qt steps (moc, lupdate) in referenced projects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 3.3.0
    • General
    • None
    • VisualStudio 2022 17.11.5
    • Windows

      We have e.g. a ProjectA, which has a project reference to ProjectB (for linking).

      When executing "Project Only | Build Only ProjectA" in VisualStudio or with msbuild on command line via option "/p:BuildProjectReferences=false", then not only the moc steps of ProjectA are executed, it also executes the moc steps of ProjectB.

      It looks like this is related to the following dependency tree in msbuild targets:

      AddPublicBMIsToProjectsInfoForReference
          FixupCLCompileOptions
              QtUpdateCompilerOptions
                  QtAddCompilerSources
                      QtWork
                          QtVarsLoad
                          QtWorkPrepare

      We have (tried) to disable the execution of qt tools during design time by setting
      <QtToolsDesignTime>false</QtToolsDesignTime> in qt_defaults.props .

      Is there a way to avoid/control that the steps of referenced projects are triggered when we try to use "project only" builds ?

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

            qtvstools Qt VS Tools
            alexn100 Alexander Nussbaumer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes