VS 2017 - Close tabs to right - visual-studio-2017

How is it possible to Close the tabs to the right in MS Visual Studio 2017?
The VS2017 still lacks this functionality and the plugin (CloseTabsToRight.vsix) I used in previous version (VS2015) doesn't seem to be installable upon this version of VS ("This extension is already installed to all applicable products").

New version of Close Tabs To Right plugin compat with VS2017 is available already through Extensions and Updates.

Related

Qt VS Tools: error reading VS project settings

I develop an application using Visual Studio 2015 + Qt VS Tools extension. For me it's first time I used Qt (version 5.14.1) in my project. Everything was working fine until something wrong happened.
I was asked to make release version of my application, it worked fine on Windows 10 and Windows 7 64-bit systems. Then I set the project configuration back to Debug x64 to continue my work. First strange thing I noticed - when I double-clicked on *.ui form files in my Solution Explorer, Visual Studio crashed and reloaded without any error, Qt Designer doesn't launch.
What I tried:
First I tried to open Qt Designer externally (from bin folder in Qt directory) and open my form - it worked.
I tried another project made in VS 2015 + Qt VS Tools Extension - same problem.
I tried to remove my Qt Version and re-add it. And here it comes: Error screenshot. It also occurs without using system enviroment variable $(QTDIR).
I reinstalled Qt to my PC (installed version 5.14.2 instead of 5.14.1), same error.
I reinstalled Visual Studio 2015, same error.
I tried to reset my Visual Studio settings and parameters to default, no results.
I installed Visual Studio 2019. The problem is still present.
UPD:
I cleared Visual Studio cache according to these instructions. It didn't work for me.
I removed every Visual C++ Redistributables from my PC and installed the latest version from Microsoft site. It also didn't work.
The error occurs even if no project is opened, so the problem is caused either by Visual Studio 2015, by Qt 5.14, or by Qt VS Tools extension.
P.S. Sorry if my english wasn't perfect. Waiting for any ideas on fixing this problem.
For any future readers who have this problem, start your maintenance tool or Qt installer, e.g. C:\Qt\MaintenanceTool.exe, "Add or remove components", and then make sure Qt/<version>/MSVC is installed, as shown in the image below:
.
Then you'll be able to select that Qt version instead of MinGW, since the Visual Studio extension only supports the MSVC compiler and not MinGW.
Encountered the exact same problem and the only solution I have found was reverting to an older version of the Qt Visual Studio Tools extension.
Visual Studio has been painfully persistent about updating the version even once I installed an older one, so make sure to disable automatic extension updates (Extensions → Manage Extensions → Extension Settings → Uncheck Automatically search for updates/Automatically update extensions).
Hope it helps.
To solve your problem, you need to remove the QTDIR and QMAKESPEC environment variables that remain in Windows after installing older versions of Qt.
Well, after some more procedures that didn't help, I just did clean-reinstallation for my Windows 10. Fortunately, that helped :)

Is it possible to target windows 10.0.14393 with C++/WinRT?

I would like to make an app for my Lumia stuck on Win 10.0.14393 (or 1609) using C++/WinRT. I've created a Blank app project with
Target platform version: 10.0.17134.0 and
Target platform min. version: 10.0.14393.
The project fails to compile with the following errors:
error C2039: 'DisconnectUnloadedObject': is not a member of 'winrt::BlankApp2::implementation::MainPageT'
error C2039: 'UnloadObject': is not a member of 'winrt::BlankApp2::implementation::MainPageT'
Is this a bug or intentional behavior? Please note, that setting any newer min. version results in successful build.
The latest version of C++/WinRT can support all versions of Windows 10, including 14393 and older versions as well.
Keep in mind that C++/WinRT is both a library and a language projection. The language projection provides access to Windows APIs targeting a given version of Windows. Each version introduces new APIs. So if you want to target a minimum version of Windows, you need to ensure that you limit yourself to the APIs available on that version of Windows. I would however recommend using the latest compiler and the latest Windows SDK as they include many bug fixes.
I suggest you use Visual Studio 2015 when targeting older C++/WinRT and Windows 10 updates. My impression is that most of those were delivered on top of Visual Studio 2015 with Visual Studio 2015 updates and Windows 10 SDK updates and C++/WinRT updates.
When using Visual Studio 2015 with C++/WinRT, you will need the latest update, Update 3. Check for updates and make sure that your copy of Visual Studio 2015 has the most recent updates. I was just using an install of Visual Studio 2015 Enterprise to recompile something that compiles fine with Visual Studio 2017 and found that I was missing tools and SDKs including for Win 10 SDK 10.0.14393 that were in the Update 3 which I had not yet installed.
You can also go to Programs and Feature from within Control Panel, look for Microsoft Visual Studio 2015 in the list and then do a right mouse click and Change which will allow you to check what is installed and change anything.
Working with C++/WinRT over the last few months I have used both the Visual Studio 2017 Community Edition and the Visual Studio 2015 Enterprise Edition.
I have seen differences when moving a solution from VS 2015 to VS 2017 that required me to review the Properties page of the solution. See also the discussion in synchronizing SDK with Windows 10 update and using WinRT with Standard C++
Working with the latest Windows 10 updates and VS 2017 works best for me because I am able to target the recent Windows 10 updates. However I have found that trying to target older Windows 10 updates with VS 2017 can be problematic.
I'm sorry that I can not be more specific. This whole area of C++/WinRT and Windows 10 updates has much more cowboy than I would like though it now seems to be settling down.
C++/WinRT is a template library that was originally an open source project on GitHub. My impression is that Microsoft has acquired it and it is now a standard product offering. I believe there was a significant rewrite of C++/WinRT at one time as the Visual Studio 2015 and then Visual Studio 2017 moved to implement more of the C++17 and proposed C++20 standards and the Technical Specifications for coroutines.
This seems to be an area still changing to some extent. However most of the changing was going on with VS 2015 and the early VS 2017 along with the SDKs. It seems to be pretty solid now with the latest updates.

Does Fortify have a VS2017 plugin?

When I install fortify, I see options only for VS2015 plugin or older. Just to be sure - is a VS2017 plugin available as of now, or no? My version is HPE_Security_Fortify_SCA_and_Apps_16.20_windows_x64.exe, maybe there is a newer version, I don't know.
The Visual Studio 2017 Plugin is planned for the next release (17.20), which is coming out soon.
I have never used the plug in but in the visual studio gallery it says it supports visual studio 2017
https://marketplace.visualstudio.com/items?itemName=HPESecurityFortify.HPESecurityFortifyonDemandExtension-18282

Installing Qt 5.5 on Windows 7

I would like to install latest version of Qt (5.5) on Windows 7 for C/C++ application development, and have a few questions:
Can I use Microsoft "Visual Studio Community" edition (2015) as the compiler?
I assume I need to install Visual studio first and then Qt?
I am going to install Qt from here, after downloading and installation do I need to build Qt? Or it is ready to go?
Is there a tutorial that explains all the required steps in details. I have done Google search and found bits and pieces here and there not not a good complete step-by-step reference.
Thanks for the help.
You need the compiler, which is integrated in visual studio. I don't think you can get the newer ones without Visual Studio (From official sources). However, you can use Qt on windows without msvc. You can build with the minGw compiler - but I personally like msvc more.
Regarding VS2015: It won't work without extra configuration. Qt 5.5 supports msvc2013 only (the next release, 5.6, will support the msvc2015 compiler). But Visual Studio 2013 will work. The order of installation doesn't matter.
After you installed Qt, all you need to do is launch Qt-Creator and start coding ;) If you wan't to use Visual Studio instead, there is a Plugin on the bottom of the download page ("Other downloads"). Visual Studio 2015 isn't supported here too, but 2013 is.

How to compile C++ for Windows with clang in Visual Studio 2015

As far as I understand, Visual Studio 2015 is shipped with clang. First I though this was only for Android and iOS apps, but according to this article it should also be possible to use the clang++ frontend for Windows programs. However, I can't find the according option.
So could you please explain to me, how I can change the used compiler to clang in a c++ project (in VS2015 RC Community Edition).
Starting with VS2015 Update 1 you can install the "Clang with Microsoft CodeGen" template via the New Project window, browse to Installed -> Templates -> Visual C++ -> Cross Platform.
You will then be able to choose the Clang 3.7 with Microsoft CodeGen v140_clang_3_7 Platform Toolset in the properties page of any Windows C++ project.
Clang has a completely different set of command-line options which it recognizes, so when using the v140_clang_3_7 toolset, the project properties must be using Clang-compatible options, which can be recognized as starting with - instead of /. For example, Debug Information Format property set to "Full Debug Information (DWARF2) (-g2 -gdwarf-2)", and Enable C++ Exceptions property set to "Yes (-fexceptions)".
There's more information in this blog post.
As far as I understand it both Clang and GCC are shipped with the Android and iOS crossplatform SDKs/tools for Visual Studio 2015.
From what I've seen it only allows me to choose those while having one of those crossplatform projects.
Using the template project for a GLES C++ application you get the following options:
While for a Windows C++ application you get the dialog below where you can see that Windows target platform is grayed out and read-only, meaning you probably have a set of toolkits for each target platform, but you simply cannot change it, at least for now.
Have no idea how you turn a normal VS project into crossplatform though, and it's likely that you can only target Android or iOS out of the box using 3rd party compilers.
It may be possible, though, to install Clang as another toolkit in the same way the XP toolkits are. So perhaps it's just a matter of someone fiddling with it and making it available as it is already installed.
Caveat: This answer is pre-VS2015 update 1 which didn't have the "Clang with Microsoft CodeGen" option.
After reading through the linked post and especially the comments again, I came to understand, that this is not a feature shipped with VS2015 RC but a possible future feature that might e.g. be shipped in a SP or (more likely) with the next version of VS.
As mentioned by sjdowling, the closest thing you can do at the moment (October 2015, clang 3.7) is to download and install llvm for windows. This should give you a LLVM-vs2014 platform toolset option. For me it works for simple test programs, but apparently this version of "clang-vs" seems to not yet support exceptions. However, according to these notes, that problem should be mostly solved for clang 3.8.
While the above solutions work they require that you have installed clang which is off by default in the visual studio 2015 installation. The accepted answer does show how to install it, though the next page will ask you to close visual studio which you are running the new project from.
If anyone is wondering how to install clang because it does not show up in their list here is another solution:
Control Panel->Programs->Programs and Features.
Right click on “Microsoft Visual Studio Enterprise 2015” (or
“Microsoft Visual
Studio 15 Preview” if you have the preview of the next version of
Visual Studio installed)
Click “Change”
Click “Modify”
Select “Clang with Microsoft CodeGen” – The March 2016 release.
https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/