0

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?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
  • ***Does someone notice this behavior??*** I don't although I use `CMake` to generated my Visual Studio 2019 projects for `Qt`. You didn't mention how you are using `Qt` with Visual Studio. – drescherjm Aug 27 '19 at 13:31
  • drescherjm: I am also using CMake to generate the solution. Sorry I forgot to mention. One collegue is still using VS 2017 and he has no this problem. – Javier De Pedro Aug 27 '19 at 14:08

1 Answers1

1

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.

  • I not working in the project any more and also I switch to use Ninja to build instead of using Visual Studio solutions and MSBuild. After that I did not have that problem. Thanks for the information any way. – Javier De Pedro Sep 19 '20 at 16:12