如何修复 Qt 5.6 beta 和 VS2015 的 QT VS 插件? [英] How to fix QT VS Add-in for Qt 5.6 beta and VS2015?

查看:26
本文介绍了如何修复 Qt 5.6 beta 和 VS2015 的 QT VS 插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有自己编译 Qt,而是使用了官方 Qt 网站的安装程序(从几天前开始提供 5.6 测试版).安装成功,Qt 文件夹包含带有 qmake 和一切的 bin 文件夹.在 Qt Creator 中构建应用程序有效.

I did not compile Qt myself, rather I used installer from official Qt website (5.6 beta is available since few days ago). Installation was successful, Qt folder conatins bin folder with qmake and everything. Building apps in Qt Creator works.

但是,当我尝试使用 VS addin 1.2.5.9 启动 Qt 时出现错误

However, when I try to launch Qt using VS addin 1.2.5.9 I get error

没有找到默认的 Qt 版本.请检查您的 Qt Visual Studio 插件设置.

No default Qt version found. Pleae check your Qt Visual Studio Add-in settings.

我已经编辑了 QT5 ->Qt 选项 包含到 5.6 beta 的正确 Qt 路径,错误仍然存​​在.

I have edited QT5 -> Qt Options to contain the correct Qt path to 5.6 beta, error still persists.

我还在 Windows 10 的路径中添加了 QTDIR.

I have also added QTDIR into Path in Windows 10.

我正在使用 Visual Studio 2015 社区版

I am using Community Edition of Visual Studio 2015

如何解决这个问题?在 VS 下新建 Qt 项目也失败了.

How to fix this? Create new Qt project under VS fails as well.

推荐答案

Visual Studio 2015 不再支持 Qt Visual Studio 插件.Microsoft 决定在 Visual Studio 2013 中弃用 AddIn 支持,并且在 Visual Studio 2015 中删除了对它的所有支持.这在 https://bugreports.qt.io/browse/QTVSADDINBUG-404 中有介绍.但是,您可以安装一个名为 Qt5Package 的扩展程序.

The Qt Visual Studio add-in is no longer supported in Visual Studio 2015. Microsoft decided to deprecate AddIn support in Visual Studio 2013 and with Visual Studio 2015 all support for it has been removed. This is covered in https://bugreports.qt.io/browse/QTVSADDINBUG-404. However, there's an extension called Qt5Package you can install instead.

我发现当我尝试在扩展中添加 Qt 5.6.0 Beta 时出现错误此 Qt 版本使用不支持的 makefile 生成器(使用:MSVC.NETMSBUILD,支持:MSVC.NET,MSBUILD)".解决方法位于 C:QtQt5.6.05.6msvc2015mkspecscommonmsvc-desktop.conf Qt 5.6.0 将所有特定于版本的更改拆分为单独的文件 msvc-base.conf.如果您复制此文件的内容并替换 mscv-desktop.conf 中的include(msvc-base.conf)"行,则 Qt5Package 可以毫无问题地识别 Qt 5.6.0 Beta.

I found when I tried to add Qt 5.6.0 Beta in the extension I got the error "This Qt version uses an unsupported makefile generator (used: MSVC.NETMSBUILD, supported: MSVC.NET, MSBUILD)". The workaround is in C:QtQt5.6.05.6msvc2015mkspecscommonmsvc-desktop.conf Qt 5.6.0 splits all the version-specific changes into a separate file msvc-base.conf. If you copy the contents of this file and replace the line "include(msvc- base.conf)" in mscv-desktop.conf then Qt5Package recognises the Qt 5.6.0 Beta with no problems.

请注意,这仍然需要在 Qt5Package 中修复.

Note this still needs to be fixed in Qt5Package.

这篇关于如何修复 Qt 5.6 beta 和 VS2015 的 QT VS 插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆