【问题标题】:Getting an error building VS project using Microsoft.Build after update更新后使用 Microsoft.Build 构建 VS 项目时出错
【发布时间】:2021-10-28 15:24:29
【问题描述】:

我有一个使用 Microsoft.Build 库构建另一个项目的 C# 项目。在我将 VS 升级到 16.11.5 版本之前,它一直运行良好。现在,执行 project.Build() 时,我在下面的记录器文件中收到错误:

ERROR C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4693,7): The "WroteAtLeastOneFile" parameter is not supported by the "Copy" task. Verify the parameter exists on the task, and it is a gettable public instance property.

我尝试从 VS 手动构建,它可以工作,但通过代码构建时不行。

【问题讨论】:

    标签: c# msbuild


    【解决方案1】:

    打开 Microsoft.Common.CurrentVersion.targets 文件并删除以下元素并保存文件:

    <Output TaskParameter =” WroteAtLeastOneFile “PropertyName =” WroteAtLeastOneFile “/>
    

    【讨论】:

      猜你喜欢
      • 2017-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-07
      • 2023-01-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多