webview 2 icon not displayed in Visual Studio toolbox - c++

For some reason, and after trying all the solutions that i found on the internet, the Webview 2 tool isn't showing in the Toolbox.
I have installed and upgraded Visual Studio, Microsoft Edge and Microsoft Edge Canary, but nothing seem to help.
i am using Visual Studio 2019 version 16.7.2
Webview 2 9.538 (Pre-release, as suggested in one of the answers, i have tried all other versions also).
i have downloaded and installed Edge Canary version 87.0.629.0.
the version of Edge is "85.0.564.44‏".
any idea ?
‏

i would like to share with you the solution:
i have added the component manually:
inside toolbox menu -> right click anywhere -> choose items -> browse -> project name -> packages - > webView 2 folder -> lib -> net462 -> Microsoft.Web.WebView2.WinForms.dll
disclaimer:
I have tried this solution with other (newer) webView 2 releases, but it didn't work (as specified in the question i'm using v.9.538 (Pre-release).

Related

CCheckListBox items get overlapped on selection if app build using 'Visual Studio 2017 (v141)' Platform Toolset

Currently trying to use CCheckListBox control into a project.
The project is a simple MFC Dialog based application.
Into the dialog added List Box control with below specific property.
Owner Draw -> Fixed
Selection -> Multiple
Has String -> True
Added below variable into header using Class Wizard
CCheckListBox mCheckListBox;
Added below item into source file.
mCheckListBox.AddString(L"Item-1");
mCheckListBox.AddString(L"Item-2");
mCheckListBox.AddString(L"Item-3");
mCheckListBox.AddString(L"Item-4");
Once the app build using Platform Toolset 'Visual Studio 2012 (v110)', the app works without issues.
But if build the app using Platform Toolset 'Visual Studio 2017 (v141)', the list item gets overlapped on selection.
If there is anyone face the same, please share the solution.
It will be highly appreciated.
Note:
If there is same question available, please share the link.
It's another MFC bug.
You can circumvent this bug by adding this somewhere in the OnInitDialog method:
mCheckListBox.SetFont(GetFont());

"Manage Client-Side Libraries" menu not appearing

I'm trying to use the new Library Manager (LibMan) feature in Visual Studio 2017 (I'm using Version 15.7.1) but it is not appearing on either the project context menu or the Project menu.
I have tried various web projects but I can't see it for any of them. The only project type I haven't tried is ASP.NET Core 2.1 (I don't have the preview installed) but I can't find any docs that say it only works with ASP.NET Core 2.1
Here is a screenshot to prove it's not there:
had the same issue. I found the answer two it on another site, but for the life of me cannot find it for reference right now. The easiest thing to do is to build it yourself and install it. Works perfectly fine, I did it and now have the Manage Client Side libraries showing up.
Clone / download the Library Manager from GitHub. (https://github.com/aspnet/LibraryManager/)
Build it in Visual Studio 2017
Run the .Vsix installer
Begin to use the Manage Client Side Libraries from the context menu or project menu.
Hope this helps.
For me, in VS 2022 the context menu option appears but the dialog doesn't show. I found out that instead of right-clicking on project item i have to right-click on wwwroot item and then the dialog is shown
Even though Visual Studio Community 15.7.5 references the "Library Manager" it looks like it is still in Preview and to be released with VS 15.8.
If you would like to use the Library Manager now it is fairly easy but there are a few work arounds right now to get it to install, probably a reason it is still in Preview.
Clone or Download the source code
Note: This requires the Visual Studio extension development Workload to be installed (Tools -> Get Tools and Features under "Other Toolsets").
According to this issue on GitHub it will not install, before compiling the Extension open the project file for the LibraryManager.Vsix project
[LibraryManagerDir]\src\LibraryManager.Vsix\Microsoft.Web.LibraryManager.Vsix.csproj
and update (line #30)
<IsProductComponent>false</IsProductComponent>
After 15.8 comes out this needs to be reset back to true to be able to install it.
Open the LibraryManager.sln and make sure to change the Configuration to Release and Build the Solution.
This will create a .vsix install file:
[LibraryManagerDir]\src\LibraryManager.Vsix\bin\Release\Microsoft.Web.LibraryManager.vsix
Open Microsoft.Web.LibraryManager.vsix to launch the Visual Studio Installer.
Then you will have the Add->Client Side Library in your Context Menu.

MFC development in vs2017

When I installed vs2017, I did select Windows development with C++ option. After installation, however, I don't see the MFC has been added. Sure enough, I get errors when I compile my application,
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
I cannot find the Change/Modify option with my vs2017 installation in Control Panel. How can I add "Microsoft Foundation Classes for C++" package?
If you look near the top of the VS Installer window, you'll see Workloads, Individual Components and Language Packs.
At least as far as I can see, none of the "Workloads" will include MFC in your installation. To get it, you first have to click on "Individual Components", then scroll quite a ways down to get to the "SDKs, libraries and frameworks" section. In there, you'll find a list of components for ATL and MFC support:
In the VS 2019 installer, the list of possibilities has gotten even longer. There are versions for ARM, ARM64, and x86/x64 both with and without Spectre mitigations, for each of the 141 and 142 build sets:
That's not necessarily the end of the story though: by default, even when you install that, it only installs the version Unicode build of MFC. If you want the narrow-character version, you have to install that separately. I don't think there's any entry in the installer to do this at all--but if you try to build a project that uses narrow-character MFC, you'll get an error message that includes a link to download it.
In Windows 10 with Visual Studio 2017 Community Edition to modify the Visual Studio 2017 installation, I had to go into Settings from the Windows Start menu then in the search box enter "Apps & Features" to bring up the list of installed applications (just typing in "apps" was enough to bring it up in the list).
I then looked for Microsoft Visual Studio 2017 in the list of apps, clicked on that entry which then displayed the Modify button. Clicking on the Modify button will bring up the installer to allow you to modify the various components.
I have seen cases where the installer wants to do an Update of Visual Studio 2017 before allowing you to do the Modify action. Depends on the last time you used it and the last time you did an update.
So instead of a Modify button there may instead be an Update button.
Note: see also How to install (v142) Build tools in Visual studio which describes issues seen with install order when installing both VS 2017 and VS 2019.
The VS 2017 Modify dialog has three tabs, "Workloads", "Individual components", and "Language packs". Click on the "Individual components" then scroll down to the section titled "SDKs, libraries, and frameworks" which is the last section in my install. There should be an entry for "MFC and ATL support (x86 and x64)" with a checkbox near the end.
There is a lot of stuff available from this "Individual components" view of the "Modify installation" dialog.
Just to add a tip for VS 2019:
#Jerry Coffin's answer does a good job of laying out the explosion of MFC/ATL options in VS 2019. Since there are many options and each MFC pack is 1.1+GB, here is how to pick the right one.
Platform: Hopefully you know this :) but it is in project properties.
Version: For an existing project, it is found in the project properties under "Configuration Properties -> General -> Platform Toolset"
Below is a screenshot showing both (Win32=x86 in this case). In this case I needed "C++ MFC for v141 build tools (x86 & x64)":
You should use Visual Studio Installer to make changes.
To create an MFC project, you just need to select Win32 project/Win32 Console Application for your application type, and then click OK. In Application Wizard, click next, in Application Settings, check MFC under Add common header files for:.

My Visual Studio 2017 Enterprise edition CodeLens does not display

Toggle the CodeLens feature off and then on again.
But CodeLens not display on method.
Visual Studio 2015 Enterprise edition working well, in same PC.
Go into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Uncheck "Enable CodeLens" option and click OK.
Go back into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Check the "Enable CodeLens" option and click OK.
Ok, I've managed to solve the issue for now.I've deleted the .suo file under hidden folder .vs, which lives in solution folder. Just navigate inside this .vs folder and find the v15 subfolder. Inside it, it will be a .suo file. Delete it and restart VS 2017.Hope it works for you!
I tried the solution mentioned here, it did not work.
So I just went ahead n reset the vs settings which did the trick.
Tools>Import and Export settings>Reset all settings (I did not save previous settings)

How to enable IntelliSense for C++ in Visual Studio 2015

I've just installed VS2015 for C++ development, however traditional hot keys like ctrl+space or . or -> don't show the IntelliSense window.
Somewhere on the web I found that I needed to open the IntelliSense Manager from the Tools menu. But that's not in my Tools window.
In addition, I reviewed related items in my IDE settings and found a Text Editor -> C++ -> Advanced - IntelliSense section with a number of settings, including Disable IntelliSense, which is True in my setup. The problem is that all settings in this section are readonly (not editable).
How do I fix the problem?
VS2015.2, fresh install. No previous installation on this host.