SDK 3.1.401 blows up on "dotnet pack" if project uses paket
See original GitHub issueDescription
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
-
install SDK 3.1.401
-
use
dotnet pack
on project using paket
---- or ----
Use attached project:
./paket install
./fake release
- edit
settings.cfg
- comment
pkdn31401a
line (with#
) - 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
The nuget team has identified the cause of the regression, now we’re waiting on triage and such.