I would like to enable building packages automatically during our build process but am running an error when doing so:
- <BuildPackage>true</BuildPackage> in our CSPROJ global <PropertyGroup/>.
Error 1 An item with the same key has already been added. My Project
Error 2 The command ""C:\Source\Me\project-structure\.nuget\nuget.exe" pack "C:\source\Me\project-structure\My Project\My Project.csproj" -p Configuration=Debug -o "C:\source\Me\my-project\My
Project\bin\Debug" -symbols" exited with code 1. My Project
When I run the same type thing from the command line: nuget.exe pack ".\My Project.csproj" the NUPKG is generated just fine.
This is a solution with some tests which depend on the NuGet-ified package, so plausible guess is that the project is building twice, so the NuGet targets are processing twice?
Would be great if we could get our build CI/CD pipeline flowing seamlessly. Is there NuGet a workaround for this? Or how might we workaround it otherwise?