-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webview2 nuget package 1.0.961.33 triggers compiler warnings #1722
Comments
I can confirm that the warnings go away when I revert back to the nuGet package 1.0.902.49 |
In case this is of any relevance.... my Solution is built against .NET Framework 4.8 |
Thanks for the bug report @rozeboosje - I've added it to our backlog to take a look! |
Thank you @champnic for the prompt response. |
@rozeboosje Can you share how you are building the project? The path you gave: I wonder if something isn't setting the |
Or if you are able to share a project which reproduces the issue that would be ideal. |
Ok I had to rip the guts out of a Solution with 49 projects in it but this is the issue reduced to its bare essentials. |
I would hope that VS was a bit more robust when it comes to handling ".."s in file paths but who knows :) Is it something that can be addressed? I noticed alright that the build output didn't throw any warnings but it still leaves me feeling very uneasy about it. |
This is happening with me also. Every time I restart VS it warns about C:\LMDev\PracticeManagement\Dev\PracticeManagement\packages\Microsoft.Web.WebView2.1.0.961.33\build..\lib\Microsoft.Web.WebView2.Core.winmd' could not be found. |
@rozeboosje what version of Visual Studio are you using? I tried to reproduce it on Visual Studio 2022 Preview 5 and I can't reproduce it. |
Visual Studio 2019 Professional Version 16.11.3 |
In that case, would you download the preview of VS 2022 and try it? You can download it from https://visualstudio.microsoft.com/vs/preview/ |
ok I'm downloading it but please tell me this won't interfere with my current VS.... |
It will not interfere. It supports side by side installations |
There is some step that I am missing because I can't reproduce. Could you write down the repro steps? If I am able to reproduce it then I can capture logging that will help us diagnose the problem. |
I'm not sure what to tell you about reproducing it. Have you seen the sample I uploaded - Sample.zip - 6 days ago? |
Yes, that is what I have been using to try to reproduce it. Here are the steps I am following:
|
I am able to reproduce this if I build and then wait for about 3 minutes. The warning shows up about 3 minutes after the build was successful. |
Nice one... thank you |
I have just upgraded to WebView2.1.0.992.28 I am still getting the same warnings |
and I'm getting System.ArgumentExceptions but I'll log them in a different issue. I've reverted back to 1.0.961.33 |
I am seeing this same issue with SDK version 1.0.992.28 on multiple programs using the WebView2 SDK. Two warnings displayed in the Visual Studio Error List
Each time I open the .SLN, two references are added to the project.
I remove those references, save the project, close Visual Studio, start Visual Studio 2019 Version 16.11.3 and open the .SLN ---- those two references reappear. Source of the references Versions |
Can confirm that this is still occurring with SDK 1.0.1020.30, in both Visual Studio 2019 v16.11.6 and Visual Studio 2022 v17.0.0 |
I also can confirm that this is still occurring with Webview2 SDK 1.0.1020.30 and Visual Studio 2019 v16.11.6 |
I have been seeing this for a while in Visual Studio 2019 and have been asked about it a couple of times by team members. It's obviously only an annoyance, but it does bother a few of us. Ours is a .NET Framework project as well. |
Yes I was playing around with this for a while and at some point I did a .NET 5 project using a WebView2 and it does not cause this warning, but, please, a lot of us are still stuck on .NET Framework 4.8 and will be for the foreseeable future. |
Same exact problem with SDK version 1.0.1056-prerelease. |
Still happening in 1.0.1054.31 While you're correct to say that the software still builds without errors, getting warnings in the Visual Studio "Error List" does not fill one with confidence. Also, I use the output in the Error List to make sure I haven't caused any potential issues. So getting unnecessary warnings from 3rd party components causes clutter in that list, and this might potentially lead to us overlooking genuine warnings produced by our own code. So please treat this with a little more urgency. |
Ok this is getting really upsetting now. We're still getting these warnings with build 1.0.1072.54 My previous comment still applies. Why is nothing done about this? |
Hey @rozeboosje - sorry for the delay here. I'm following up again with the VS team to see if they can take a look and root-cause this issue. The dev who was helping us recently has transitioned out of VS + holidays + this is a warning that doesn't affect the behavior of the WebView2 control itself = why nothing has been done about this yet. I understand the dev experience is still frustrating here, so I hope to hear back from the VS team soon and will update with any guidance. Thanks! |
thank you @champnic |
@rozeboosje et al - The good news is that VS was able to pinpoint the issue. They aren't going to fix it but they've given us a workaround which I'm checking in shortly :) The bad news is that we've just missed the cutoff for the next prerelease SDK this week, but it should be available in the next one in early Feb. Thanks! |
Out of curiosity can you give us a quick summary of what the problem was? But thanks very much for this. I'll be happy to wait another month |
Sure! Apparently in the CSProj system (which is the default when using .NET Framework) the Condition metadata on file references are ignored when making the list of potential files to include or look at, and so the .winmd and VCLibs are added to the references node. This is to help the Solution explorer and other tools in Visual Studio display potentially needed files without the dev needing to figure out exactly what condition they need to have for the file to show up and edit them. However, later on the Design system kicks in in the background and does look at the Conditions, and this is the mismatch that causes the warning to show up. It also explains why the warning only happens at seemingly random points after a project is opened. The CSProj system is old and not having many fixes done, so the VS team punted on this issue (also due to the potential for unintended consequences, like files disappearing from projects). But luckily the workaround was pretty easy. We switched from the Condition property to using a |
Still happening with 2.0.1108.44, I'm afraid. |
That's expected. Can you try with 1.0.1158-prerelease? |
Yes the issue is gone in 1.0.1158-prerelease ... we don't use prereleases in software that needs to be distributed to clients, but I guess this means the fix will be in the next official release? |
Yes, this should go out with the next release in early March. |
I have just installed the official release 1.0.1150.38 and I'm delighted to report that the problem has now gone away. Thank you again! |
Today is Thursday 19th May 2022 and this issue is still happening under Will it ever be resolved? |
The original issue was resolved. Are you seeing the exact same symptoms? Can you share a screenshot? Do you still see the issue if you use a newer Visual Studio, or if you use WV2 SDK 1.0.1150.38 (to see if this was a regression)? |
Severity Code Description Project File Line Suppression State
Warning The referenced component 'redacted\packages\Microsoft.Web.WebView2.1.0.961.33\build..\lib\Microsoft.Web.WebView2.Core.winmd' could not be found. redacted
Warning The referenced component 'Microsoft.VCLibs.Desktop' could not be found. redacted
When I look at the references I see the following:
Microsoft.VCLibs.Desktop, Version=14.0
redacted\packages\Microsoft.Web.WebView2.1.0.961.33\build..\lib\Microsoft.Web.WebView2.Core.winmd
I can right-click on the references and remove them and the Solution builds without warnings, but when I close the Solution and open it again the above references reappear and when I try to build the warnings reappear.
AB#35907224
The text was updated successfully, but these errors were encountered: