By default, when you use ProjectReference to Reference Project A
into Project B
under new-sdk project, it actually views the Project A as a nuget dependency.
Make sure you did not add <PrivateAssets>All</PrivateAssets>
under Project B's ProjectReference. PrivateAssets
will break the nuget dependency for Project A
when you pack Project B
.
If you have this:
<ItemGroup>
<ProjectReference Include="..ProjectAProjectA.csproj">
<PrivateAssets>All</PrivateAssets>
</ProjectReference>
</ItemGroup>
Please remove <PrivateAssets>All</PrivateAssets>
.
In my side, when I publish the Project B, it has the nuget project of A.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…