In my solution I have a few projects, which pack their own nuget packages on build. When packing the package I use the PackageID parameter to add a customprefix to the package name (which otherwise would be the name of the project).
dotnet pack .\$(ProjectName).csproj --include-symbols --no-build -o C:\dev\Packages -p:PackageID=CustomPrefix.$(ProjectName)
It works fine.
Now, in my Azure Devop Pipeline, I was using the dotnet task to pack my packages like so:
- task: DotNetCoreCLI@2 displayName: 'dotnet pack' inputs: command: 'pack' packagesToPack: '${{parameters.solutionPath}}' nobuild: true includesymbols: true versioningScheme: 'off'
Now obviously this does not add the prefix and I have no idea how to do it, especially since here I path the path to the actual solution, not the project. It just pack the packages for all projects in the solution, without any means to customize it. Any clue on how I could do that ?