dotnet pack fails with paket and .NET Core 2.1.500
See original GitHub issueDescription
Get the error message when running dotnet pack
with .NET Core 2.1.500:
/Users/dbrattli/Developer/GitHub/classlib/.paket/Paket.Restore.targets(226,5): error : The provided SymbolPackageFormat value is invalid. Allowed values : 'snupkg', 'symbols.nupkg'. [/Users/dbrattli/Developer/GitHub/classlib/classlib.csproj]
I have no idea is this is an issue is related to dotnet and/or paket. Tested on Mac OS X 14.4.1, and Windows 10, and get the same error on three different machines and installations.
Repro steps
-
Install .NET Core 2.1.500, https://www.microsoft.com/net/download
-
dotnet new classlib -o myproject
-
Add paket to new project and initialize. Add a nuget to dependencies so project file
classlib.csproj
imports Paket.Restore.targets`:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<Import Project=".paket\Paket.Restore.targets" />
</Project>
-
dotnet restore
-
dotnet build
-
dotnet pack
Expected behavior
Expected behavior is that dotnet pack
completes without error. This used to work in earlier versions of dotnet.
Actual behavior
➜ classlib dotnet pack
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
shasum: /Users/dbrattli/Developer/GitHub/classlib/.paket/../paket-files/paket.restore.cached:
Paket version 5.188.1
Starting full restore process.
Performance:
- Disk IO: 17 milliseconds
- Runtime: 2 seconds
Restoring packages for /Users/dbrattli/Developer/GitHub/classlib/classlib.csproj...
Restore completed in 178.88 ms for /Users/dbrattli/Developer/GitHub/classlib/classlib.csproj.
Paket version 5.188.1
The last restore is still up to date. Nothing left to do.
Performance:
- Runtime: 60 milliseconds
classlib -> /Users/dbrattli/Developer/GitHub/classlib/bin/Debug/netstandard2.0/classlib.dll
Paket version 5.188.1
Performance:
- Runtime: 644 milliseconds
/Users/dbrattli/Developer/GitHub/classlib/.paket/Paket.Restore.targets(226,5): error : The provided SymbolPackageFormat value is invalid. Allowed values : 'snupkg', 'symbols.nupkg'. [/Users/dbrattli/Developer/GitHub/classlib/classlib.csproj]
Known workarounds
Don’t know any workarounds. Downgrading dotnet might work.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:27 (16 by maintainers)
Top Results From Across the Web
dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a...
Read more >dotnet pack recently failing
NET Core SDK/runtime version is too old. The recommended solution is to add a UseDotNet task before your original tasks: - task: UseDotNet@2 ......
Read more >Nuget restore fails on Azure Devops with message "unable ...
Tried specifying a specific version of nuget before the restore, without success .NET Core SDK latest version in the build agent is 2.1.500...
Read more >Paket and the .NET SDK / .NET Core CLI tools (dotnet CLI ...
A dependency manager for .NET with support for NuGet packages and git repositories.
Read more >Using .NET Core Tools to Create Reusable and Shareable ...
Dotnet Tools offer a simple way to create, publish and consume what are essentially .NET Core applications that can be published and shared ......
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
so just for advice to others, my workaround is to copy the paket.restore.targets and add SymbolPackageFormat line as described above and then amend my projects to import this amended file rather than the default one. Hopefully will get a fix and undo this, it only affects a few of my projects
So apparently my fix wasn’t good enough. https://github.com/fsprojects/Paket/issues/3429
Any ideas?