How to convert a Visual Studio project to use Qt VS Tools
-
Using VS2019 and VS Tools 2.9.1 Rev. 6.
I have a number of Visual Studio projects which I need to modify or convert to use Qt VS Tools.
What is the correct approach to achieve this. I've seen conflicting reports of how it should be done on Stack Overflow, so felt I needed to come here to get the correct procedure.
Many thanks
David -
You've already asked that :) Convert Visual Studio 2017 Solution to use Qt
Should be similar for the newer versions. There's no officially supported procedure, so there's no "correct" way to do it. Only what works for you.
-
Hah, a couple of times now I was looking for some information and found my own post giving that information to someone couple years earlier. Yup, human brains don't age well.
-
Well I did this:
<PropertyGroup Label="Globals"> <SccProjectName /> <SccLocalPath /> <Keyword>QtVS_v302</Keyword> <ProjectGuid>{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}</ProjectGuid> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup>
reloaded the project and did the Extensions/Qt VS Tools/Convert custom build steps..
and got:
😦
David -
The version of the Qt VS Tools extension changed since then. Currently it's
QtVS_v304
. Try that, it works for me.
Also make sure you have your solution selected in solution explorer when you run that option. -
I tried that and still got the same message.
The project in question builds a static library (that may be relevant).
I did manage to convert a command line project, but when I tried to build it I got:
2>------ Build started: Project: DeepSkyStackerCL, Configuration: Release x64 ------
2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : There's no Qt version assigned to project DeepSkyStackerCL.vcxproj for configuration Release/x64.
2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : Please set a Qt installation in 'Project|Properties|Configuration Properties|Qt Project Settings|Qt Installation'.
2>Done building project "DeepSkyStackerCL.vcxproj" -- FAILED.And yes the Qt Installation IS set:
-
I guess something must've changed. That's the problem with unsupported processes.
Well, the easiest, I think, would be to create a basic working Qt project using a wizard and compare the .vcxproj files looking for Qt related stuff.