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

msbuild /t:pack fails with The "DevelopmentDependency" parameter is not supported by the "PackTask" task #12

Closed
AArnott opened this issue Jul 11, 2017 · 4 comments

Comments

@AArnott
Copy link
Collaborator

AArnott commented Jul 11, 2017

Details about Problem

VS version (if appropriate): d15rel 26709.00

dotnet --info
.NET Command Line Tools (2.0.0-preview2-006497)

Product Information:
 Version:            2.0.0-preview2-006497
 Commit SHA-1 hash:  06a2093335

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-25407-01
  Build    : 40c565230930ead58a50719c0ec799df77bddee9

This works fine on the latest 15.2 release, so it's a regression in 15.3.

Detailed repro steps so we can see the same problem

git clone https://github.com/AArnott/C5.git
cd c5
git checkout 9d0121eb993f7aeaec1566e22e94f563967935bc
MSBuild /t:restore
cd c5
MSBuild /t:pack

Expected

Build succeeds

Actual

msbuild /t:pack
C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(156,15): error MSB4064: The "DevelopmentDependency" parameter is not supported by the "PackTask" task. Verify the parameter exists on the task, and it is a settable public instance property. [C:\git\c5\c5\C5.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(141,5): error MSB4063: The "PackTask" task could not be initialized with its input parameters.  [C:\git\c5\c5\C5.csproj]

Ported from NuGet/Home#5584 because @rohit21agrawal tracked down the problem to:

based on what i can see from msbuild module loading log, your issue is happening because msbuild is trying to load nuget.build.tasks.pack.dll from :
'MSBuild.exe' (CLR v4.0.30319: MSBuild.exe): Loaded 'C:\Users\ragrawal.nuget\packages\msbuild.sdk.extras\1.0.3\build\NuGet.Build.Tasks.Pack\Desktop\NuGet.Build.Tasks.Pack.dll'. Cannot find or open the PDB file.
why does msbuild.sdk.extras have a copy of nguet.build.tasks.pack inside it?

@clairernovotny
Copy link
Collaborator

Those should only be used for SDK 1.x builds. The 1.0.5 extras package should not be importing the pack task/targets.

The reason it was, was to provide fixes that were in NuGet before an SDK/VS release.

@clairernovotny
Copy link
Collaborator

The error message indicates extras 1.0.3. This was fixed in 1.0.4 except for the bug you found, so can you check with 1.0.5?

@AArnott
Copy link
Collaborator Author

AArnott commented Jul 11, 2017

yes. checking now...

@AArnott
Copy link
Collaborator Author

AArnott commented Jul 11, 2017

Yup. It works in 1.0.5. Thanks.

@AArnott AArnott closed this as completed Jul 11, 2017
tg73 added a commit to zanyants/CodeGeneration.Roslyn that referenced this issue Sep 14, 2018
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

2 participants