question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK 3.1.401 blows up on "dotnet pack" if project uses paket

See original GitHub issue

Description

As usual - new dotnet core release (3.1.401) new problems. After installing new SDK (3.1.401 released 2020/08/11) previously working project blows up on “dotnet pack”

C:\dev\k4os\pkdn31401> "C:\Program Files\dotnet\dotnet.EXE"  pack "C:\dev\k4os\pkdn31401\src\pkdn31401a" --configuration Release --output "C:\dev\k4os\pkdn31401\.output" --no-build --no-restore /nodeReuse:False "/bl:C:\Users\...\AppData\Local\Temp\tmp4C4B.tmp.binlog" (In: false, Out: false, Err: false)
Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\3.1.401\MSBuild.dll -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\3.1.401\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\3.1.401\dotnet.dll -maxcpucount -property:Configuration=Release -property:PackageOutputPath=C:\dev\k4os\pkdn31401\.output -property:NoBuild=true -target:pack -verbosity:m /bl:C:\Users\...\AppData\Local\Temp\tmp4C4B.tmp.binlog /nodeReuse:False C:\dev\k4os\pkdn31401\src\pkdn31401a\pkdn31401a.csproj
C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): error MSB4181: The "PackTask" task returned false but did not log an error. [C:\dev\k4os\pkdn31401\src\pkdn31401a\pkdn31401a.csproj]
: C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): error MSB4181: The "PackTask" task returned false but did not log an error.

then actual error being: error MSB4181: The "PackTask" task returned false but did not log an error.

Repro steps

  1. install SDK 3.1.401

  2. use dotnet pack on project using paket

---- or ----

Use attached project:

  1. ./paket install
  2. ./fake release
  3. edit settings.cfg
  4. comment pkdn31401a line (with #)
  5. observe it will now work (as the other project does not use paket)

(zip attached)

Expected behavior

Not blow up.

Actual behavior

Blows up.

Known workarounds

global.json

pkdn31401.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
MiloszKrajewskicommented, Sep 4, 2020

@forki I absolutely understand that. I was just answering to @Nicholi (or anyone interested in workaround) as he seemed to be not familiar with “global.json” shenanigans.

2reactions
baronfelcommented, Aug 26, 2020

The nuget team has identified the cause of the regression, now we’re waiting on triage and such.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'dotnet pack' uses Release configuration - .NET
Learn about a breaking change in the .NET 8 SDK where 'dotnet pack' uses the 'Release' configuration by default.
Read more >
Create NuGet package from .NET Core 3.1 class library ...
When I pack the MyPackage project (via Visual Studio Solution Explorer > right click the project file > Pack) a *.nupkg file is...
Read more >
Include both Nuget Package References *and* project ...
One issue I have been encountering is that the command was either referencing the required nuget packages, or the project reference DLLs, never ......
Read more >
Paket and the .NET SDK / .NET Core CLI tools (dotnet CLI ...
After paket. references files files have been created, run dotnet restore (see restoring packages) to update your projects. This hook tells the ....
Read more >
Include both Nuget Package References and project ...
Recently I have been trying to generate more Nuget packages for our dotnet core projects, utilizing the dotnet pack command.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found