VS 2019 keeps finding qrc cpp files as modified even when they are not

124 Views Asked by At

I work in a project using Qt compiled with Visual Studio C++ compiler.

I noticed after migrating from VS2017 to VS2019 that when building the application, VS always find qrc cpp files as modified and try to rebuild them.

Is not happening for all projects though, only some unit tests.

Does someone notice this behavior?

1

There are 1 best solutions below

1
Patrick Lathe On

I've had the same issues when upgrading from vc141 (2017) to vc142 (2019). It's old but the only post I found, so:

The difference in the toolkits is that in vc142 "Custom Build Tools" are now appended to include inherited values. If your project is configured to use a build tool projectwide by default (for example meta objects from QTs signal/slot), the compiler will try to do that as well when trying to rcc the qrc files, and ultimately failing without throwing an error.

Simply removing ;%(Outputs) in Properties->Custom Build Tool->General->Outputs solved it for me.