Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-869

Potential wrong Qt build target/props when launching in command line

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 2.7.0
    • Fix Version/s: None
    • Component/s: Qt/MSBuild
    • Labels:
      None
    • Environment:
      Visual Studio 16.8.6
      Windows 10
    • Platform/s:
      Windows

      Description

      After updating to QtVSTools 2.7.0 rev28 and Visual Studio 16.8.6, I still have a similar bug to QTVSADDINBUG-857 on my build agents.
      Here the error I have few times:

      80>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(354,5): error MSB3491: Could not write lines to file "D:\BuildAgent\56798798\compilation\Debug_x64\ProjectA\ProjectA.tlog\ProjectA.lastbuildstate". The process cannot access the file 'D:\BuildAgent\56798798\compilation\Debug_x64\ProjectA\ProjectA.tlog\ProjectA.lastbuildstate' because it is being used by another process.
      80>Done building project "ProjectA.vcxproj" -- FAILED.
      80>C:\Users\frlyo-builder\AppData\Local\QtMsBuild\qt_globals.targets(407,5): error MSB3491: Could not write lines to file "D:\BuildAgent\56798798\compilation\Debug_x64\ProjectB\ProjectB.tlog\ProjectB.write.1u.tlog". The process cannot access the file 'D:\BuildAgent\56798798\compilation\Debug_x64\ProjectB\ProjectB.tlog\ProjectB.write.1u.tlog' because it is being used by another process.
      80>Done building project "ProjectB.vcxproj" -- FAILED.
      

      I launched the compilation using this command line :

      "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" Solution.sln /Build "Debug|x64" /Out "D:\BuildAgent\temp\buildTmp\tmpb5wqw34f-VS-build.log"
      

      Perhaps, I understand where the problem come from. It seems that the file inside "%LOCALAPPDATA%\QtMsBuild" are not updated when the compilation is launched from command line.
      For a test, I try to modify a qt_globals.targets, launch devenv. In that case, the file is updated.
      Now, I modified again qt_globals.targets, launch in commande line the compilation and the file is not updated.

      So it could explain that the error I see, which could be an error of previous QtVSTools version, with QtMsBuild files not yet updated with the new plugin.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            mecfc Miguel Costa
            Reporter:
            francoisj Francois JEAN
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes