“找不到参考的组件”但是vs在我删除后不断重新添加参考
在我的 .net Framework 4.8 项目中,在 References 文件夹(在解决方案资源管理器中)中,有对
C:\Users\Owner\.nuget\packages\microsoft.web.webview2\1.0.1054.31\build 等项目的引用\..\lib\Microsoft.Web.WebView2.Core.winmd
这不存在。我也不需要它,因为我单独引用了 WebView2.Core,因此这一行似乎没有必要。我可以删除它,一切都会建立起来。但是当我关闭解决方案并重新打开时,它又出现了。当我构建时这也会产生警告。
值得注意的是,我最近迁移到了 PackageReference
,因此除了这个 References
文件夹之外,还有一个 packages.config
文件,但该文件没有没有 WebView2
所以它在这里似乎不相关。
In my .net framework 4.8 project, in the References folder (in solution explorer) there are references to projects such as
C:\Users\Owner\.nuget\packages\microsoft.web.webview2\1.0.1054.31\build\..\lib\Microsoft.Web.WebView2.Core.winmd
This does not exist. I also don't need it, as separately I have a reference to WebView2.Core and so this line seems unnecessary. I can delete it, and everything will build. But when I close the solution and reopen in, it reappears. This also produces warnings when I build.
Of note, I recently did the migration to PackageReference
, so there's a packages.config
file in addition to this References
folder, but that file doesn't have WebView2
so it doesn't seem relevant here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由WebView2的错误引起的。更新到最新的使用Nuget解决了问题。说明:
This was caused by a bug with WebView2. Updating to the latest using Nuget resolved the issue. Explanation:
https://github.com/MicrosoftEdge/WebView2Feedback/issues/1722