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. VS Tools in VS2022 do not work with vcpkg installed Qt6
Forum Updated to NodeBB v4.3 + New Features

VS Tools in VS2022 do not work with vcpkg installed Qt6

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Stefan Schwarzer
    wrote on last edited by
    #1

    I am trying to convert a VS2017/vs-addins Qt5 project to VS2022 and Qt6. I have installed VS2022 (17.10.3) and Qt VS Tools (3.2.0 rev47) from the Extension Manager. I am managing several projects on the computer and I try to have them share open source libraries by managing those with a current vcpkg instance. Among others, qtbase (Qt 6.7.2) is installed. I added that library as the default Qt version to VS by selecting the qmake.exe in C:\vcpkg\installed\x64-windows\tools\Qt6\bin\qmake.exe. This seems to be ok, as the Qt VS Tools startup reports 'qt6 check OK'.

    However, VS then tries to load the project file and fails with:
    [...]AppData\Local\QtMsBuild\qt_private.props(209,5): The expression "[System.IO.File]::ReadAllText(C:\vcpkg\installed\x64-windows\tools\Qt6\mkspecs\qconfig.pri)" cannot be evaluated. Could not find a part of the path [... offending path repeated]

    I have checked qt_private.props and sure enough, the rule given there to build the offending path does not work, the path should read ... x64-windows\share\Qt6 ... I have tried to patch the qt_private.props to this end, but somehow it gets overwritten each time that VS starts.

    So for now my conclusion is that vcpkg seems to meddle a bit with the expected installation paths and thus the rule in qt_private.props fails (that would require me to have an extra installation of qt6 around). But then that rule to find qconfig.pri could also be an unwarranted assumption, which means that I am looking at a bug in the VS Tools extension.

    I'd like to get an expert opinion on this.

    1 Reply Last reply
    0
    • liscoL Offline
      liscoL Offline
      lisco
      wrote on last edited by
      #2

      I run
      vcpkg install qt5
      and then mount its qmake to msvc2019 by Qt Add-on, compile release of my project is well, but debug doesn't, debug placed in /debug/bin, /debug/lib and both cant be found by msvc add-on. I thought how to combine release and debug changing cmake directives

      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