Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
2.10.1 (rev.02)
-
Visual Studio 2019/2022
-
c8d7ec4da (dev)
Description
Code
# Pro2VcxprojTest.pro QT -= gui SOURCES += main.cpp myresources.files = hello.json myresources.prefix = / RESOURCES += myresources
Steps to reproduce
- Use "Extensions" > "Qt VS Tools" > "Open Qt Project File (.pro)..." to import the attached project
- Try to build the project
Outcomes
warning MSB8027: Two or more files with the name of qrc_qmake_myresources.cpp will produce outputs to the same location. This can lead to an incorrect build result. The files involved are Debug\qrc_qmake_myresources.cpp, Debug\qrc_qmake_myresources.cpp.
Workarounds
- Manually right-click one of the .qrc files and select "Exclude From Project", OR
- Instead of using "inline" resources, put them under a .qrc file in the .pro file before importing, OR
- Instead of using the Qt VS Tools extension, use the console to run `qmake.exe -tp vc -r Pro2VcxprojTest.pro`. This generates a project that correctly excludes one of the .qrc files
Attachments
For Gerrit Dashboard: QTVSADDINBUG-1113 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
506663,3 | Fix broken .vcxproj when auto-generating .qrc files | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |