Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
2.4.1 (rev.12)
-
None
-
Visual Studio 2019 16.3.7
-
-
eaec25644b42bbda04a6337f7ad46678097a1910
Description
I have a project that was upgraded from Visual Studio 2010 to Visual Studio 2019. It is also being migrated from Qt 4.7.4 to Qt 5.13.
If I use "Convert custom build steps to Qt/MSBuild", I get a critical error popup, with only the message: "Object reference not set to an instance of an object.", and the title of that popup is "Microsoft Visual Studio".
It was working for some other projects, so I ended up finding out that if I set some additional dependencies in the linker options, just so that the .vcxproj file has the <AdditionalDependencies> line, it works. Simply adding ";" to the additional dependencies work.
It was already working fine for projects that had dependencies defined there.
Also, adding something like ";", then removing it also doesn't work. The vcxproj ends up with the following:
<AdditionalDependencies> </AdditionalDependencies>
Which triggers a different error about an invalid character.
This project did not have additional dependencies because we were using #pragma comment(lib, ...) instructions to specify the libraries.
On a side note, some projects ended up with 2 different Qt versions defined in the <Globals> section of the vcxproj, like:
<Keyword>QtVS_v301</Keyword> <Keyword>Qt4VSv1.0</Keyword>
I had to remove the Qt4 one manually when it happened. Not sure if this is in any way related to this issue, though.
Attachments
For Gerrit Dashboard: QTVSADDINBUG-702 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
282768,2 | Fix conversion error with empty linker dependencies | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |
282769,2 | Fix setting project keywork during conversion | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |