SoFunction
Updated on 2025-03-10

Solution to the MSB3073 command that appears in VS compilation

The following error messages often appear during the development of Qt + Vs:

Error MSB3073 Command ""\bin\" --list "" > "x64\Debug\rcc_list.txt" 2> nul" has been exited with code 3.
C:\Users\CHAP\AppData\Local\QtMsBuild\ 74

error MSB3073: Command "…\bin\Win32\Debug\bin\" --list "…\" > "…\tmp\rcc_list.txt" 2> nul" has been exited with code 3. C:\Users\lilin\AppData\Local\QtMsBuild\rcc\ 116 5 ribbonsample

Cause of error:

RCC program path is set incorrectly.
Sometimes the vs qt development environment inexplicably changes user parameters.

What's special is that two projects under the same sln, one sets the qtdir environment variable to compile normally, and the other must be set to an absolute path.

When importing qt's vs plugin, the engineering conversion result is not quite ideal. Various compilation problems occur frequently.

Solution:

Modify the .user file of the same directory as the project file

The modifications are as follows:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <QTDIR>D:\SoftWare\Qt598\5.9.8\msvc2017_64</QTDIR>
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <QTDIR>D:\SoftWare\Qt598\5.9.8\msvc2017_64</QTDIR>
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
  </PropertyGroup>

Among them, D:\SoftWare\Qt598\5.9.8\msvc2017_64 is the Qt installation directory

This is the end of this article about the solution to the MSB3073 command that appears in VS compilation. For more related content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!