MSVC 2012 with Qt 5 Add-In 1.2.4 Cannot build New Projects



  • Hi,

    I have been scouring the web to try to resolve this but have had no luck. What I have done is installed a fresh version of MSVC2012, which I then updated. I also installed the latest Qt (5.4) and the new Qt Add in (1.2.4). When I try to build a project now, I select the "Qt Application" option, give the project a name, select the QT items I need and click finish. I then get a MSVC error: "Object reference not set to an instance of an object". I have noticed that in an existing project, there is a xxx.vcxproj.user file which contains the definition of the "QTDIR". In this instance, after I get the error there is a .vcxproj and a .vcxproj.filters file (also .sdf and .opensdf files). There are no other files generated and the project is not created within MSVC.

    I have checked that I am using the correct Qt version under QT5... Qt Options. I am able to run this correctly in MSVC 2010. I know this problem is related to MSVC but I can buil a regular win32 project in MSVC 2012 - it seems to be an issue with the Qt5 Add-In and MSVC 2012.

    Thanks for reading!



  • Hey,

    I also recently installed the same (VS2012 and Qt Add-in 1.2.4) and am getting the same errors as you! So, you're not alone.

    While doing some digging of my own, I stumbled across the Qt Add-In bug tracking page. It looks like 1.2.4 is broken with VS2012 (but not VS 2013). Apparently, 1.2.3 will work though (I can't confirm yet, however).

    Here's the link: https://bugreports.qt.io/browse/QTVSADDINBUG-392?jql=project = QTVSADDINBUG

    Cheers,
    Wilcroft


  • Moderators

    This might indeed be an add-in problem, but lets exclude other possibilities.
    To clarify - You've installed VS2012 Update 4?
    Can you try an older version of the add-in (found "here":http://download.qt.io/official_releases/vsaddin/)?
    Do you have any other extensions installed?
    Does it happen for example when you import an existing Qt Creator project (.pro)?
    Can you try to run VS as admin and see if the problem remains?



  • I can't speak for the OP, but in my experience:
    [quote author="Chris Kawa" date="1422379274"]This might indeed be an add-in problem, but lets exclude other possibilities.
    To clarify - You've installed VS2012 Update 4?[/quote]Yup.
    [quote]Can you try an older version of the add-in (found "here":http://download.qt.io/official_releases/vsaddin/)?[/quote]Just installed 1.2.3, and it does work. I also get the various Qt-related options when right-clicking on a qt-project in the solution explorer, which I didn't get with 1.2.4
    [quote]Do you have any other extensions installed?[/quote] Nope.
    [quote]Does it happen for example when you import an existing Qt Creator project (.pro)?[/quote] Yep. Import errors just like new project creation.
    [quote]Can you try to run VS as admin and see if the problem remains?[/quote]No change.



  • wilcroft, thanks for the above answer as my answers are identical.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.