I have a C# WPF library on NuGet. After publishing a new release (.nupkg file), I wanted to also upload the Symbols package (.snupkg file). But I get The checksum does not match for the dll(s) and corresponding pdb(s).
error:
I have successfully published .snupkg file together with .nupkg file for 2 other C# .NET Framework libraries, following the exact same procedure as here. The only difference that I can think of is that this a WPF library (it has *.xaml files and it has a reference to PresentationFramework), whereas the other two aren't.
The procedure:
- The settings for Release configuration in the
.csproj
files:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU'"><DebugType>portable</DebugType><Optimize>true</Optimize><OutputPath>bin\Release\</OutputPath><DefineConstants>TRACE</DefineConstants><ErrorReport>prompt</ErrorReport><WarningLevel>4</WarningLevel><DocumentationFile>bin\Release\GM.WPF.xml</DocumentationFile><DebugSymbols>true</DebugSymbols></PropertyGroup>
- Rebuild (this generates
.dll
,.dll.config
,.pdb
,.xml
files in bin/Release). - I have a
.nuspec
file with the metadata for the NuGet package in the same folder as the.csproj
file (I don't think it's necessary to show the.nuspec
file - not relevant to this problem). - Open PowerShell in this folder.
- Execute command
nuget pack -Properties Configuration=Release -Symbols -SymbolPackageFormat snupkg
(this generates.nupkg
and.snupkg
files). - Upload
.nupkg
file to NuGet. - Upload
.snupkg
file to NuGet - this is where I get the error.
Please, if you need any other information, I can provide it.