更新到Visual Studio 15.8.5后的构建问题 [英] Build issues after updating to visual studio 15.8.5

查看:58
本文介绍了更新到Visual Studio 15.8.5后的构建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人遇到过此错误吗?


严重级别代码说明项目文件行抑制状态
错误项目 C :\Program Files(x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\Microsoft.Win32.Primitives.dll在项目列表 ReferencePath中未为元数据 CopyLocal定义值。为了使用此元数据,可以通过指定%(ReferencePath.CopyLocal)对其进行限定,或者确保此列表中的所有项目都为此元数据定义了一个值。 Batch_WPF

Severity Code Description Project File Line Suppression State Error The item "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\Microsoft.Win32.Primitives.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. Batch_WPF

如果我将Visual Studio降级,问题就不复存在了。

If I downgrade visual studio the issue goes away.

推荐答案

我通过删除.csproj文件中的以下代码来解决此错误。

I've fixed this error by removing the following code in my .csproj file.

<Target Name="FixClickOnceDependencies" BeforeTargets="_DeploymentComputeClickOnceManifestInfo">
<ItemGroup>
  <_noCopyRefs Include="@(ReferencePath)" Condition="'%(ReferencePath.Private)' == 'false'" />
  <_noCopyRefsByFileName Include="@(_noCopyRefs->'%(FileName)')">
    <OriginalItem>%(Identity)</OriginalItem>
  </_noCopyRefsByFileName>
  <_libByFileName Include="@(ReferenceCopyLocalPaths->'%(FileName)')">
    <OriginalItem>%(Identity)</OriginalItem>
  </_libByFileName>
  <_overlappingRefByFileName Include="@(_noCopyRefsByFileName)" Condition="'@(_noCopyRefsByFileName)' == '@(_libByFileName)' AND '%(Identity)' != ''" />
  <_overlappingLibByFileName Include="@(_libByFileName)" Condition="'@(_noCopyRefsByFileName)' == '@(_libByFileName)' AND '%(Identity)' != ''" />
  <_overlappingRef Include="@(_overlappingRefByFileName->'%(OriginalItem)')" />
  <_overlappingLib Include="@(_overlappingLibByFileName->'%(OriginalItem)')" />
</ItemGroup>
<ItemGroup Condition="'@(_overlappingRef)' != ''">
  <ReferencePath Remove="@(_overlappingRef)" />
  <ReferencePath Include="@(_overlappingLib)">
    <Private>True</Private>
  </ReferencePath>
</ItemGroup>

我按顺序添加了此代码修复单击一次的错误,如下所述: https://github.com/dotnet/ standard / issues / 529

I added this code in order to fix an error with Click Once, as described here: https://github.com/dotnet/standard/issues/529

这篇关于更新到Visual Studio 15.8.5后的构建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆