Get error in qtdepoly.targets at version 6.6.2 and 6.7
-
When building a debug and release version with option "Run Deployment Tool" set to "Yes" getting this error:
1>C:\Users\lpk9012\AppData\Local\QtMsBuild\deploy\qtdeploy.targets(269,5): error MSB4023: Cannot evaluate the item metadata "%(Fullpath)". The item metadata "%(Fullpath)" cannot be applied to the path "Adding in plugin type generic for module: Qt6Gui". The given path's format is not supported.
Using VS2022 Enterprise 17.9.6
Works fine with 6.6.1 and before.
-
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.