I have a Visual Studio solution that has (as well as test projects etc) two projects that will end up as Nuget packages. ProjectA doesn't have any dependencies, but ProjectB depends on ProjectA. The solution is in a GitHub repository, with workflows set up to build and publish the two projects to Nuget.
In Visual Studio, I have a project reference from ProjectB to ProjectA, which makes development and testing easy. However, when I publish, I would like to have ProjectB have a Nuget package dependency on ProjectA, rather than including the DLLs in the package.
Is there an easy way to do this? I saw this SO answer, but it seems very manual. I was hoping there was some way to do this as part of the build and publish workflow.