-
I'd like to publish the Lombiq UI Testing Toolbox for Orchard Core project on NuGet. This contains multiple csprojs that need to be packaged individually, referenced by the root sln file. I get a "The package does not contain any symbol (.pdb) files." error when publishing the snupkg corresponding to the main Lombiq.Tests.UI project. And fair enough, the created snupkg doesn't contain a PDB, despite the build output ( These are the commands I use to package all projects, run in the root of the repo (i.e. building the solution): dotnet restore -p:NuGetBuild=True
dotnet build --configuration Release --no-restore -p:NuGetBuild=True -p:LangVersion=Latest -p:GenerateDocumentationFile=True -p:NoWarn=CS1573%3BCS1591%3BVSTHRD002%3BVSTHRD200 -p:EnableNETAnalyzers=false -p:ContinuousIntegrationBuild=true -p:DebugSymbols=true -p:DebugType=portable
dotnet pack --output artifacts --configuration Release --no-restore --no-build -p:NuGetBuild=True -p:Version=0.0.10 -p:GenerateDocumentationFile=True -p:NoWarn=NU5104 -p:TreatWarningsAsErrors=true -warnaserror -p:WarnOnPackingNonPackableProject=True -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg The other two I noticed the same issue in this other project of ours. Both of them are testing-related, so maybe goes wrong related to that? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It turns out that this is due to the project using Shouldly, since Shouldly overrides some necessary properties. Adding the following fixed the issue: <PropertyGroup>
<Optimize>true</Optimize>
<DebugType>portable</DebugType>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
</PropertyGroup> |
Beta Was this translation helpful? Give feedback.
It turns out that this is due to the project using Shouldly, since Shouldly overrides some necessary properties. Adding the following fixed the issue: