Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Unable to setup QT VS Tool - VS2019

Unable to setup QT VS Tool - VS2019

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 998 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wernickel
    wrote on last edited by Wernickel
    #1

    Hi,
    I just installed the qt Software and the VS tool in order to develop with VS 2019.
    If I want to compile the system tells me "Unexpectd Error while GetVarsFromMakefile in File qt_vars.targets in line 246.
    It is an exception because of duplicate key.
    Is there anybody who can help me?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      isdsi
      wrote on last edited by
      #2

      Did you click the 'build project' button only like below?
      4319c467-afa7-4ac9-8498-33d873327454-image.png

      Please, attach the captured image.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wernickel
        wrote on last edited by Wernickel
        #3

        Sorry, you misunderstood me.
        While using the QT Creator the compile of the project works fine.
        But I would like to cretae and manage the project by using the VS Tool.
        If I want to compile the project with VS 2019 I get the error above.
        Its only in German ...

        Duplicate key in line 246:
        <!--// Read variables from Makefile -->
        <GetVarsFromMakefile
        Makefile="$(QtVarsWorkDir)\Makefile" VarDefs="@(QtVarDef)">
        <Output TaskParameter="OutVars" ItemName="QtVar"/>
        </GetVarsFromMakefile>

        Error.jpg

        I assume the problem is somewhere in the configuration of the VS Tool but I don't know where ...
        Because of the error the Tool doesn't create the ui_*.h file.

        PS:
        I just have reinstalled qt, the error during GetVarsFromMakefile seems to be solved.
        Nevertheless the tool doesn't create the ui_*.h file.
        The version of the VS Tool is 2.4.2, qt version is 5.14.0.

        PPS: The problem with the GetVarsFromMakefile ist still there...

        jsulmJ 1 Reply Last reply
        0
        • W Wernickel

          Sorry, you misunderstood me.
          While using the QT Creator the compile of the project works fine.
          But I would like to cretae and manage the project by using the VS Tool.
          If I want to compile the project with VS 2019 I get the error above.
          Its only in German ...

          Duplicate key in line 246:
          <!--// Read variables from Makefile -->
          <GetVarsFromMakefile
          Makefile="$(QtVarsWorkDir)\Makefile" VarDefs="@(QtVarDef)">
          <Output TaskParameter="OutVars" ItemName="QtVar"/>
          </GetVarsFromMakefile>

          Error.jpg

          I assume the problem is somewhere in the configuration of the VS Tool but I don't know where ...
          Because of the error the Tool doesn't create the ui_*.h file.

          PS:
          I just have reinstalled qt, the error during GetVarsFromMakefile seems to be solved.
          Nevertheless the tool doesn't create the ui_*.h file.
          The version of the VS Tool is 2.4.2, qt version is 5.14.0.

          PPS: The problem with the GetVarsFromMakefile ist still there...

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Wernickel Are you doing clean rebuild in VS?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          W 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Wernickel Are you doing clean rebuild in VS?

            W Offline
            W Offline
            Wernickel
            wrote on last edited by Wernickel
            #5

            @jsulm Yes, I did
            There is no ui_*.h file on the file system...

            Reading Qt configuration (E:\Qt\Qt5.14.0\5.14.0\msvc2017_64\bin\qmake.exe)
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: Unerwarteter Fehler bei der GetVarsFromMakefile-Aufgabe.
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) 1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) 1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector)
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei InlineCode.GetVarsFromMakefile.Execute() in c:\Users\Werner\AppData\Local\Temp\s31vf5fk.0.cs:Zeile 71.
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
            1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
            1>Die Erstellung des Projekts "QtGuiApplication1.vcxproj" ist abgeschlossen -- FEHLER.
            ========== Alles neu erstellen: 0 erfolgreich, 1 fehlerhaft, 0 übersprungen ==========

            W 1 Reply Last reply
            0
            • W Wernickel

              @jsulm Yes, I did
              There is no ui_*.h file on the file system...

              Reading Qt configuration (E:\Qt\Qt5.14.0\5.14.0\msvc2017_64\bin\qmake.exe)
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: Unerwarteter Fehler bei der GetVarsFromMakefile-Aufgabe.
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) 1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) 1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector)
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei InlineCode.GetVarsFromMakefile.Execute() in c:\Users\Werner\AppData\Local\Temp\s31vf5fk.0.cs:Zeile 71.
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
              1>C:\Users\Werner\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4018: bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
              1>Die Erstellung des Projekts "QtGuiApplication1.vcxproj" ist abgeschlossen -- FEHLER.
              ========== Alles neu erstellen: 0 erfolgreich, 1 fehlerhaft, 0 übersprungen ==========

              W Offline
              W Offline
              Wernickel
              wrote on last edited by
              #6

              Problem is solved, using the old rev_09 of VS Tool, it is working...

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved