Paket.Restore.targets error MSB4064: The "Readme" parameter is not supported by the "PackTask" task loaded from assembly: NuGet.Build.Tasks.Pack, Version=5.6.0.5, #4213
I have an error when building a solution by msbuild.exe
C:\Agents\agent1\_work\5\s\Tests\.paket\Paket.Restore.targets(368,15): error MSB4064: The "Readme" parameter is not supported by the "PackTask" task loaded from assembly: NuGet.Build.Tasks.Pack, Version=5.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35 from the path: C:\Program Files\dotnet\sdk\3.1.302\Sdks\NuGet.Build.Tasks.Pack\Desktop\NuGet.Build.Tasks.Pack.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property. Paket.Restore.targets(322,5): error MSB4063: The "PackTask" task could not be initialized with its input parameters.
Repro steps
My Solution has projects netstandard2.0 with GeneratePackageOnBuild and projects .netcore3.1, Framework 4.6.2.
csproj:
\.paket\Paket.Restore.targets(368,15): error MSB4064: The "Readme" parameter is not supported by the "PackTask" task loaded from assembly: NuGet.Build.Tasks.Pack, Version=5.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35 from the path: C:\Program Files\dotnet\sdk\3.1.302\Sdks\NuGet.Build.Tasks.Pack\Desktop\NuGet.Build.Tasks.Pack.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
\.paket\Paket.Restore.targets(322,5): error MSB4063: The "PackTask" task could not be initialized with its input parameters.
Description
I have an error when building a solution by msbuild.exe
C:\Agents\agent1\_work\5\s\Tests\.paket\Paket.Restore.targets(368,15): error MSB4064: The "Readme" parameter is not supported by the "PackTask" task loaded from assembly: NuGet.Build.Tasks.Pack, Version=5.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35 from the path: C:\Program Files\dotnet\sdk\3.1.302\Sdks\NuGet.Build.Tasks.Pack\Desktop\NuGet.Build.Tasks.Pack.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property. Paket.Restore.targets(322,5): error MSB4063: The "PackTask" task could not be initialized with its input parameters.
Repro steps
Readme="$(PackageReadmeFile)"
Expected behavior
Success result
Actual behavior
Known workarounds
Visual Studio Build Tools 16.11.27