Qt5 VisualStudio Add-in 1.2.4 not populating the QTDIR macro



  • I saw (but now can't find again) a bug related to this issue that was already fixed in an older version but it is happening to me every time the *.vcxproj.user file is deleted.

    Qt5 Add-In re-creates it but does not set the QTDIR macro.

    As you can see in the below example, the add-in adds the $(QTDIR)\bin path to the PATH environment variable but does not declare the QTDIR macro.

    @<?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="12.0" >
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    </PropertyGroup>
    </Project>@

    The correct file content (which I have to manually modifiy for all projects in the whole solution) is the following:

    @<?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="12.0" >
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
    </PropertyGroup>
    </Project>@

    Seems important to note that in our scenario we have 3 different Qt versions installed in parallel. The Solution's Qt version is the default one but is set by name instead of using the DefaultQtVersion macro, so the *.vcxproj files have something like:

    @Qt5Version_x0020_Win32="5.3"@

    instead of:

    @Qt5Version_x0020_Win32="$(DefaultQtVersion)"@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.