gpt4 book ai didi

c# - 由于我不太明白的错误而无法构建 - "ReferencePath"未定义元数据 "CopyLocal"的值

转载 作者:行者123 更新时间:2023-12-04 14:32:57 24 4
gpt4 key购买 nike

我最近一直在更新一个项目,但由于以下错误(修剪了一些路径以使其更短),我无法构建此项目进行测试:

The item "C:\Users..blah..\packages\System.Runtime.WindowsRuntime.4.6.0-preview4.19212.13\build\net461....\ref\netstandard2.0\System.Runtime.WindowsRuntime.dll" in item list "ReferencePath" does not define a value for metadata "CopyLocal". In order to use this metadata, either qualify it by specifying %(ReferencePath.CopyLocal), or ensure that all items in this list define a value for this metadata.



我在网上搜索了其他解决方案,但没有找到导致这种情况的原因的答案。

就实际错误而言,我假设我可以在编辑器中加载我的项目文件,并将 %(ReferencePath.CopyLocal) 附加到任何具有“CopyLocal”空值的字段,但这似乎不是案子

我什至不确定我需要查看哪个文件!

最佳答案

当我尝试从 DotNet 4.5 项目迁移到 DotNet 4.6.2 项目时,我遇到了这个问题。当我从 package.config 迁移到 PackageReference 时,这个问题得到了解决。

右键单击项目解决方案中的“References”-> 选择“Migrate from package.config to PackageReference”。

关于c# - 由于我不太明白的错误而无法构建 - "ReferencePath"未定义元数据 "CopyLocal"的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57206085/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com