question

75061402 avatar image
0 Votes"
75061402 asked TianyuSun-MSFT edited

Can't install webview2 on visual studio 2010 and 2015

Hi, I'm doing project about migrating IWebBrowser2 to Webview2 in visual studio 2010.

However, whenever I try to install Webview2 through NuGet in VS2010, it shows following error. I also tried to install it in VS2015 but it shows same error.

I can't find how to fix this problem. And I don't know is it possible to install webview2 in VS2010.

Is there any solution to fix this?



222522-9fefe9dd-473f-43bf-9d3c-a0cde8d2e0d7.png


vs-generaldotnet-package-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered TianyuSun-MSFT edited

Hi @75061402 ,

Welcome to Microsoft Q&A forum.

Microsoft.Web.WebView2 NuGet package can still be installed in project which is developed by using VS 2010. But you may only install a previous version of WebView2 package by using command line like Install-Package Microsoft.Web.WebView2 -Version X.X.XXX in Package Manager Console.

Could you firstly try to install a previous version of WebView2 package for example version 1.0.705.50( Install-Package Microsoft.Web.WebView2 -Version 1.0.705.50 ) and check if VS reports the same error?

If VS doesn’t report the error, then it means the latest version of WebView2 package is not supported for your specific project.

If VS reports the same error, then the error should be related to VS or your project/project settings. To narrow down this issue, please try to create a new project in VS 2010 and try to use the above command line to install the WebView2 package.

  1. If it installs successfully, then the error should be affected by your specific project. You may need to check your project settings, based framework, references…

  2. If the error appears on a newly created project, then I think the error should be affected by VS IDE. Since VS 2010 is out of support, repairing VS 2010 maybe not work, you may need to reinstall VS 2010, or try to use a higher version of VS(VS 2015 is also an old version of VS, so try VS 2017, 2019 or 2022).

Best Regards,
Tianyu


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.