Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-702

Error when converting project without any AdditionalDependencies

    XMLWordPrintable

Details

    • Windows
    • 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

        1. Image.vcxproj
          334 kB
          sdelisle
        For Gerrit Dashboard: QTVSADDINBUG-702
        # Subject Branch Project Status CR V

        Activity

          People

            mecfc Miguel Costa
            sdelisle sdelisle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes