c# - Visual Studio 2019 : Cannot get rid of warning on VC++ 2015 runtime not found

标签 c# visual-studio uwp redistributable

我有 Visual Studio 2019 Community Edition,带有一个 UWP 项目。 在某个时间点,我的项目 Visual C++ 2015 redistributables 中出现了一个新的引用,在我编译时出现警告,上面写着

The referenced component 'Visual C++ 2015 Runtime for Universal Windows Platform Apps' could not be found

我试图通过右键单击 => 删除来删除引用,但是当我关闭并重新打开项目时,它会重新出现。 此外,此类引用似乎未保存在 .csproj 中,也未保存在其他解决方案文件中。

我尝试下载此处指定的可再发行组件 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/eab6ac56-44c7-416e-8397-d062baed987c/uwpc-i-got-issues-when-i-was-trying-to-release-my-app?forum=wpdevelop但是当我尝试安装时它说我已经有了更新的版本。

我怎样才能摆脱这个警告/引用?

最佳答案

为了让它消失,我必须执行两个步骤:

  1. 在 Visual Studio 安装程序工作负载修改器的可选组件下安装 C++ (v142) 通用 Windows 平台工具(或在您阅读此答案时最新的任何内容。)

enter image description here

  1. 在您的项目中,在 Reference Manager > Universal Windows > Extensions 下取消选中 Visual C++ 2015 Runtime for Universal Windows Platform。当我关闭对话框时,它并没有删除引用,但确实修复了它。我原以为必须重新添加引用,但我没有,它仍然存在。

enter image description here

关于c# - Visual Studio 2019 : Cannot get rid of warning on VC++ 2015 runtime not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60156162/

相关文章:

c# - Visual Studio 跳转到快捷方式

c# - 如何从 dataPackageView.GetDataAsync() 获取字符串

c# - 并发集合在没有 Thread.Sleep 的情况下吃太多 cpu

c# - ElapsedTicks、ElapsedMilliseconds、Elapsed.Milliseconds 和 Elapsed.TotalMilliseconds 之间的区别? (C#)

c# - 无法使用C#上传mp3,请帮忙!

c++ - Visual Studio 停止调试程序时会自动清理内存吗?

javascript - 使用angular-ui-router的angular js Controller 不起作用?

c# - UWP BarcodeScanner 预览版 : CaptureElement doesn't show any Preview

xaml - 当我更改主题设置时,为什么我的 AdaptiveTrigger 会触发?

c# - 在 .Net 中实现并行任务队列