Cannot add file to filter in Visual Studio 2015, Qt Visual Sudio Tools

  • I've installed Qt 5.9 from the online installer chosing msvc2015 64 bit it's at the version 5.9.0-201705292002, then installed Qt Visual Studio Tools extension(version 2.1.1) in Visual Studio 2015, added Qt's installation path to Qt options inside Visual Studio, then i proceed to create a new Qt Gui Application it starts to create the solution after a few seconds it fails with the following message: Cannot add solutionname.cpp to filter.

    If try to create a Qt Console Application or Qt Class Library it just works or if I try to create a new project in Qt Creator it works also and I can run it.

    There's my visual studio info:

    /Microsoft Visual Studio Community 2015
    Version 14.0.25431.01 Update 3
    Microsoft .NET Framework
    Version 4.6.01038
    Installed Version: Community
    Visual Basic 2015   00322-20000-00000-AA452
    Microsoft Visual Basic 2015
    Visual C# 2015   00322-20000-00000-AA452
    Microsoft Visual C# 2015
    Visual C++ 2015   00322-20000-00000-AA452
    Microsoft Visual C++ 2015
    Application Insights Tools for Visual Studio Package   7.18.00214.2
    Application Insights Tools for Visual Studio
    ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
    ASP.NET and Web Tools 2015.1 (Beta8)
    ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
    For additional information, visit
    ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
    For additional information, visit
    Common Azure Tools   1.8
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
    JavaScript Language Service   2.0
    JavaScript Language Service
    JavaScript Project System   2.0
    JavaScript Project System
    Microsoft Azure Mobile Services Tools   1.4
    Microsoft Azure Mobile Services Tools
    NuGet Package Manager   3.4.4
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit
    PreEmptive Analytics Visualizer   1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    Qt Visual Studio Tools   2.1.1
    The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools.
    SQL Server Data Tools   14.0.60519.0
    Microsoft SQL Server Data Tools
    TypeScript tools for Visual Studio```
    Any help would be great thanks.

  • Moderators

    Hi enghell and welcome to the Qt forum,

    I've good news for you. On my windows 8.1 system with Qt 5.9 I can make a Gui application in VS community 2015 using Qt Visual Studio Tools 2.1.1. Now we need to see what is different in your case.

    If I understand you correctly you start a new project in VS community like this? :
    Select New Project > Installed > Templates > Visual C++ > Qt > Qt GUI Application.
    The reason I ask there is a bug when starting from Qt Creator and using the pro file in VS community 2015 : QTBUG-60059

  • Hey, Thanks!

    I'm on windows 10 and indeed I create the project from inside Visual Studio 2015 templates.

  • Moderators

    Hi enghell,

    could be a lucky shot, but do you have administrator rights on your pc ?

    Could you test bycreating a new project after starting visual studio as administrator=
    RMB on executable and select "run as administrator"

    VS is rather restrictive on this

  • Thanks for the follow up, I've tried running VS as admin but didn't work, will try in VS 2017 as well VS 2010 just to check if it's something related to the VS version, or maybe a problem with my machine setup and update with the results.

    It works well in VS 2017(using VS Tools 2.1beta extension), still no clue about why it does not work in VS2015. For futher debug I may try to build VS Tools source for VS 2015 and see what information i can get with the debug build. This last is just to know why, since I can use any toolchain in VS 2017 and Target.

    Update 2:
    After a bit of playing with VS 2017 i could replicate this behavior, and it's directly related to problems with the installation of VS itself so the fix is uninstall and reinstall or repair VS, same for VS 2015.

  • @enghell Could you please elaborate on "problems with the installation of VS itself "? We're running VS2010 and older together with VS2017 and the older ones are finicky once we start reinstalling 2017, as it potentially updates some .Net Developer Packs.

    We're getting this problem with VS2017. Tried repairing, don't really want to reinstall.

Log in to reply

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