Iwerth
Iwerth

Reputation: 45

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

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.

Upvotes: 3

Views: 429

Answers (1)

jjthebig1
jjthebig1

Reputation: 638

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

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

Upvotes: 4

Related Questions