Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Leomana8 opened this issue Jun 21, 2023 · 0 comments

Comments

@Leomana8
Copy link

Leomana8 commented Jun 21, 2023

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

  1. My Solution has projects netstandard2.0 with GeneratePackageOnBuild and projects .netcore3.1, Framework 4.6.2.
    csproj:
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  1. Paket version 7.2.1+8e4eb74b42fbd45f39f7afce9184c16ebb65f16c
  2. paket restore and dotnet restore
  3. 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"
  }
}
  1. "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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant