Also happens in 6.6.3
// Run windeployqt
// -->
<PropertyGroup>
<Cmd><![CDATA["$(QtToolsPath)\windeployqt.exe"]]></Cmd>
<Cmd>$(Cmd) --list target</Cmd>
<Cmd>$(Cmd) @(Args->'%(Identity)',' ')</Cmd>
<Cmd>$(Cmd) @(PosArgs->'%(Identity)',' ')</Cmd>
</PropertyGroup>
<Message Importance="high" Text="Qt Deploy: $(Cmd)" />
<Exec Command="$(Cmd) > "$(QtDeployLog)""
EnvironmentVariables="$(QtDeployEnv)" />
<!--
///////////////////////////////////////////////////////////////////////////////////////////////
// Read deploy log into QtDeployed list
// -->
<ReadLinesFromFile File="$(QtDeployLog)">
<Output TaskParameter="Lines" ItemName="QtDeployed" />
</ReadLinesFromFile>
<ItemGroup>
<QtDeployed Remove="@(QtDeployed)" Condition="!Exists('%(Fullpath)')"/>
</ItemGroup>
This part in the qtdeploy.targets is the cause.
Apparently the first few outputs of windeployqt.exe are lines like this:
Adding in plugin type generic for module: Qt6Gui
Adding in plugin type iconengines for module: Qt6Gui
...
before outputting one .dll/.qm file per line.
<ItemGroup>
<QtDeployed Remove="@(QtDeployed)" Condition="!Exists('%(Fullpath)')"/>
</ItemGroup>
Since this part cant resolve these lines to paths, it throws the error.
That's the cause, but I'm also not good enough at Visual Studio/Qt magic to work around this.
Is there a way to inject a step into this targets file to filter the first few lines? Or just skip that step?
Edit: turns out the "--list target" parameter for windeployqt is specifically there to stop those
Edit: https://bugreports.qt.io/browse/QTBUG-122257 has been reported and fixed as of 6.8 apparently, so I guess the only fix is going to a newer Qt Version.