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

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 2.4.2 (rev.09), 2.4.3
    • 2.4.1 (rev.12)
    • Build-time integration
    • None
    • Visual Studio 2019 16.3.7
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        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