Home > database >  Getting an error building VS project using Microsoft.Build after update
Getting an error building VS project using Microsoft.Build after update

Time:10-29

I have a C# project that builds another project using Microsoft.Build library. It worked perfect until I upgraded VS to version 16.11.5. Now, I am getting the error in the logger file below when executing 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.

I tried manually building from VS and it works but not when building via code.

CodePudding user response:

Open the Microsoft.Common.CurrentVersion.targets file and delete the folllowing element and save the file:

<Output TaskParameter = WroteAtLeastOneFilePropertyName = WroteAtLeastOneFile “/>
  • Related