WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

[Problem/Bug]: net core warnings for missing DLLs in a .NET Framework 4.8 solution

Open rozeboosje opened this issue 1 year ago • 6 comments

What happened?

I have a .NET Framework 4.8 Solution that uses WebView2. We updated the nuget package to 1.0.2739.15 and now when I build the software I am getting the following warnings in the Error List

Severity Code Description Project File Line Suppression State Details Warning The referenced component '.nuget\packages\microsoft.web.webview2\1.0.2739.15\build..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHFramework Warning The referenced component '.nuget\packages\microsoft.web.webview2\1.0.2739.15\build..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHFramework Warning The referenced component '.nuget\packages\microsoft.web.webview2\1.0.2739.15\build..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHFramework Warning The referenced component '.nuget\packages\microsoft.web.webview2\1.0.2739.15\build..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHFramework

Since our Solution targets .NET Framework 4.8 I'm not sure why these warnings should be relevant and they should therefore not appear. The software appears to work fine after building but we don't want to simply ignore warnings.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

128.0.2739.42

SDK Version

1.0.2739.15

Framework

WPF

Operating System

Windows 11

OS Version

No response

Repro steps

As far as I can tell this just requires a .NET Framework 4.8 Solution that uses WebView2. When you build it these warnings appear. The resulting software seems to work fine so it doesn't seem to affect end users but unnecessary warnings clutter the "error list" and this might lead to us missing something that's important so if something can be done to remove these warnings I would appreciate it.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

rozeboosje avatar Aug 29 '24 13:08 rozeboosje

Hi @rozeboosje , thank you for reporting the issue. It seems related to #4743 which has been fixed and I have provided the internally built SDKs to the chat. Can you please try checking whether you can repro the problem with 1.0.2805 and/or 1.0.2805-prerelease?

oggy22 avatar Sep 03 '24 18:09 oggy22

Hello @oggy22 sorry for the delay

At the moment in the nuget package manager the latest prerelease available to me is 1.0.2783-prerelease so it looks like I cannot install 1.0.2805 just yet?

rozeboosje avatar Sep 06 '24 09:09 rozeboosje

It seems like you need to make sure you set the sources to local folder where you downloaded the nuget files. You navigate to your project in the Solution Explorer, right click on the solution -> Manage Nuget Packages... On the top-right side change the Package Source to point to the local folder where you downloaded the file (and renamed it). Maybe this page can help https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

oggy22 avatar Sep 08 '24 05:09 oggy22

Hello @oggy22 we won't be able to tweak the sources for our nuget packages but I see there is a new nuget package out for build 1.0.2792.45 and it still has the same problem:

Severity Code Description Project File Line Suppression State Details Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHPreviewControl Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHDocTextHandler Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHNetDocGen Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. ScanCapture Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHDocFieldReaderDLL Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. ScanCaptureApp Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHDocAssist Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHDocFieldReader Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found. KHFramework Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHPreviewControl Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHDocTextHandler Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHNetDocGen Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. ScanCapture Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHDocFieldReaderDLL Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. ScanCaptureApp Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHDocAssist Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHDocFieldReader Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found. KHFramework Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHPreviewControl Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHDocTextHandler Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHNetDocGen Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. ScanCapture Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHDocFieldReaderDLL Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. ScanCaptureApp Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHDocAssist Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHDocFieldReader Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found. KHFramework Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHPreviewControl Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHDocTextHandler Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHNetDocGen Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. ScanCapture Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHDocFieldReaderDLL Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. ScanCaptureApp Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHDocAssist Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHDocFieldReader Warning The referenced component 'C:\Users\rozeb.nuget\packages\microsoft.web.webview2\1.0.2792.45\buildTransitive..\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found. KHFramework

rozeboosje avatar Sep 24 '24 13:09 rozeboosje

Ok, thank you for confirming it still reproes on the latest SDK versions. I believe it's related to #4812 and that is being tracked on our backlog.

oggy22 avatar Sep 27 '24 23:09 oggy22

Cheers. At least the software still builds for us.

rozeboosje avatar Sep 28 '24 08:09 rozeboosje

FWIW, I have the same/similar issue building my VSTO add-in for Excel in VS2022 (targeted to .NET Framework 4.8). After upgrading the WV2 SDK from 1.0.1774.30 to 1.0.2739.15, I get these warnings:

Warning		The referenced component '%userprofile%\.nuget\packages\microsoft.web.webview2\1.0.2739.15\build\..\\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Wpf.dll' could not be found.
Warning		The referenced component '%userprofile%\.nuget\packages\microsoft.web.webview2\1.0.2739.15\build\..\\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.WinForms.dll' could not be found.
Warning		The referenced component '%userprofile%\.nuget\packages\microsoft.web.webview2\1.0.2739.15\build\..\\lib_manual\netcoreapp3.0\Microsoft.Web.WebView2.Core.dll' could not be found.
Warning		The referenced component '%userprofile%\.nuget\packages\microsoft.web.webview2\1.0.2739.15\build\..\\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll' could not be found.

ShaunLoganOracle avatar Oct 01 '24 14:10 ShaunLoganOracle

Seems like this is fixed in 1.0.2849.39

cremor avatar Oct 23 '24 07:10 cremor

Hello all, yes, I just switched to 1.0.2849.39 and the warnings are gone. Happy days, and thank you!

rozeboosje avatar Oct 23 '24 08:10 rozeboosje