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,
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
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
- My Solution has projects netstandard2.0 with GeneratePackageOnBuild and projects .netcore3.1, Framework 4.6.2.
csproj:
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
- Paket version 7.2.1+8e4eb74b42fbd45f39f7afce9184c16ebb65f16c
- paket restore and dotnet restore
- restore generated Paket.Restore.targets
....
<!-- Call Pack -->
<PackTask Condition="$(UseMSBuild16_10_Pack)"
PackItem="$(PackProjectInputFile)"
PackageFiles="@(_PackageFiles)"
PackageFilesToExclude="@(_PackageFilesToExclude)"
PackageVersion="$(PackageVersion)"
PackageId="$(PackageId)"
Title="$(Title)"
Authors="$(Authors)"
Description="$(Description)"
Copyright="$(Copyright)"
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
LicenseUrl="$(PackageLicenseUrl)"
ProjectUrl="$(PackageProjectUrl)"
IconUrl="$(PackageIconUrl)"
ReleaseNotes="$(PackageReleaseNotes)"
Tags="$(PackageTags)"
DevelopmentDependency="$(DevelopmentDependency)"
BuildOutputInPackage="@(_BuildOutputInPackage)"
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
SymbolPackageFormat="$(SymbolPackageFormat)"
TargetFrameworks="@(_TargetFrameworks)"
AssemblyName="$(AssemblyName)"
PackageOutputPath="$(PackageOutputAbsolutePath)"
IncludeSymbols="$(IncludeSymbols)"
IncludeSource="$(IncludeSource)"
PackageTypes="$(PackageType)"
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Serviceable="$(Serviceable)"
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
IncludeBuildOutput="$(IncludeBuildOutput)"
BuildOutputFolders="$(BuildOutputTargetFolder)"
ContentTargetFolders="$(ContentTargetFolders)"
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
NuspecFile="$(NuspecFileAbsolutePath)"
NuspecBasePath="$(NuspecBasePath)"
NuspecProperties="$(NuspecProperties)"
PackageLicenseFile="$(PackageLicenseFile)"
PackageLicenseExpression="$(PackageLicenseExpression)"
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
Readme="$(PackageReadmeFile)"
NoDefaultExcludes="$(NoDefaultExcludes)"/>
...
Readme="$(PackageReadmeFile)"
5. global.json "3.1.103", "3.1.302"
{
"sdk": {
"version": "3.1.103",
"rollForward": "latestFeature"
}
}
- "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\msbuild.exe" current.sln
/p:VisualStudioVersion="16.0"
Expected behavior
Success result
Actual behavior
\.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.
Known workarounds
Visual Studio Build Tools 16.11.27
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided msbuild.exe command with the listed global.json SDK versions and inspect .paket/Paket.Restore.targets around lines 322 and 368. Compare the generated PackTask inputs, especially Readme, with the loaded NuGet.Build.Tasks.Pack assembly; done means the solution builds successfully without MSB4064 or MSB4063.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100