I have below three projects, all are created using VS2022 and targeting .net 6.
- ExternalProject (.dll)
- InternalProject (.dll)
- TestProject (.exe)
ExternalProject contains a reference to the InternalProject, also I am creating NuGet package of ExternalProject using the below command
dotnet pack ExternalProject.csproj /p:NuspecFile=ExternalClass.nuspec
The content of ExternalClass.nuspec file is below
<?xml version="1.0"?>
<package >
<metadata>
<id>ExternalProject</id>
<version>1.0.10</version>
<title>ExternalProject</title>
<authors>Ustad</authors>
<owners>Ustad</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
<files>
<file src="..\InternalProject\bin\Debug\net6.0\*.*" target="lib\net6.0" />
</files>
</package>
The problem is, that InternalProject dll is not being added to the ExternalProject NuGet package. Not sure what I am missing here.