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

Created on 12 Aug 2020  Â·  13Comments  Â·  Source: fsprojects/Paket

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

Most helpful comment

@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.

All 13 comments

This also affects anything in the new .net 5.0 preview world after 5.0.100-preview.2.20176.6.

There's a good detailed comment on one of the linked issues: https://github.com/NuGet/Home/issues/9786#issuecomment-674024644

Any chance you can send me a PR?

Chet Husk notifications@github.com schrieb am Di., 25. Aug. 2020, 00:45:

There's a good detailed comment on one of the linked issues: NuGet/Home#9786
(comment)
https://github.com/NuGet/Home/issues/9786#issuecomment-674024644

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3897#issuecomment-679403947,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAOANHCBJG4X7NFHKLWZEDSCLUSNANCNFSM4P5GDBAQ
.

I can't, it's entirely an issue with a logic change in the upstream Nuget Pack Task, unless we change the paket targets to stop surpressing package creation. But as far as I understand it, that's an intended decision to suppress the creation.

Mhm so what should we do?

Chet Husk notifications@github.com schrieb am Di., 25. Aug. 2020, 14:05:

I can't, it's entirely an issue with a logic change in the upstream Nuget
Pack Task, unless we change the paket targets to stop surpressing package
creation. But as far as I understand it, that's an intended decision to
suppress the creation.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3897#issuecomment-679983161,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAOANHH54JZOWYBJMZYZM3SCOSHDANCNFSM4P5GDBAQ
.

I just left a comment on that issue outlining the severity of the issue, as well as a brief summary of how paket uses the pack task to hopefully give some context, but I don't know what we can do locally to work around it. I thought we didn't generate the nuget package on the first call to the PackTask because the PackTask would delete the generated nuspec after that operation, meaning we couldn't get a hook to update the nuspec before packaging.

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

there seems to be a fix: https://github.com/NuGet/NuGet.Client/pull/3610 unfortunately not merged yet

I found downgrading to the previous 3.1 SDK release allowed pack to continue working in mean time.
On Ubuntu at least if you can downgrade the dotnet-sdk-3.1 package.

I've found the same problem in latest .NET 5.0 preview as well, 5.0.100-preview.8.20417.9-1. One of the issues mentioned the fix might not appear until RC2.

Current non-working SDK
3.1.401-1

Working SDK
3.1.302-1

I found downgrading to the previous 3.1 SDK release allowed pack to continue working in mean time.
On Ubuntu at least if you can downgrade the dotnet-sdk-3.1 package.

You can have both installed on Windows, you just need to use global.json, therefore it is not a big deal... yet.

The problem starts if you want to use .NET 5 (and it is approaching fast).

As mentioned, 5.0.100-preview.2.20176.6 should work, although it's pretty behind.

@MiloszKrajewski there is nothing we can do except waiting. The fix is merged upstream in NuGet and they ship it according to their schedule

@zivkan commented yesterday (see https://github.com/NuGet/NuGet.Client/pull/3610#issuecomment-686462037)

I expect the fix will be available in NuGet 5.8 and the .NET 5 SDK (rc2 maybe. I'm not sure if there's time for us to make rc1 still)

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enricosada picture enricosada  Â·  4Comments

miloszes picture miloszes  Â·  5Comments

johlrich picture johlrich  Â·  5Comments

sarudak picture sarudak  Â·  5Comments

alfonsogarciacaro picture alfonsogarciacaro  Â·  8Comments