Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Nuget Package cannot resolve dependencies. How to add all the dependent libraries into a single nuget package?

$
0
0

I have a project structure like this-enter image description here

I have created a NuGet package with Project A but when I use this Nuget 'Project A.nupkg', I get an error - Cannot find dependencies 'Project C.dll'.

Project A.csproj is

<PropertyGroup>               <TargetsForTfmSpecificBuildOutput>            $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage        </TargetsForTfmSpecificBuildOutput></PropertyGroup><ItemGroup><ProjectReference Include="..\ProjectB.csproj"><PrivateAssets>All</PrivateAssets></ProjectReference></ItemGroup><Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences"><ItemGroup><BuildOutputInPackage Include="@(ReferenceCopyLocalPaths- &gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))-&gt;WithMetadataValue('PrivateAssets', 'All'))" /></ItemGroup></Target>

Project B.csproj is

<ItemGroup><PackageReference Include="AWSSDK.Kinesis" version="3.0" /><PackageReference Include="AWSSDK.SQS" version="3.0" /><ProjectReference Include="..\ProjectC.csproj"><PrivateAssets>All</PrivateAssets></ProjectReference></ItemGroup>

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>