在NuGet包中包含引用的项目

在NuGet包中包含引用的项目,nuget,.net-standard,Nuget,.net Standard,我的解决方案中有以下项目,我正试图使用该项目创建NuGet包: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <PackageI

我的解决方案中有以下项目,我正试图使用该项目创建NuGet包:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>

    <PackageId>ExpressionTreeTestObjects</PackageId>
    <Authors>Zev Spitz</Authors>
    <Company />
    <Product>ExpressionTreeTestObjects</Product>
    <Description>A set of expression trees, and instances of other types from System.Linq.Expressions, for testing code against a variety of expression trees. The objects are generated by the C# compiler, by the VB.NET compiler, or using the factory methods at System.Linq.Expressions.Expression.</Description>
    <Copyright>Copyright (c) 2019 Zev Spitz</Copyright>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PackageProjectUrl>https://github.com/zspitz/ExpressionTreeToString</PackageProjectUrl>
    <RepositoryUrl>https://github.com/zspitz/ExpressionTreeToString</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <PackageTags>expression-tree code-generation visual-basic.net vb.net csharp test-data tostring</PackageTags>

    <IncludeBuildOutput>true</IncludeBuildOutput>
    <IncludeReferencedProjects>true</IncludeReferencedProjects>

  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\ExpressionTreeTestObjects.VB\TestObjects.VB.vbproj" />
    <ProjectReference Include="..\ExpressionTreeTestObjects\TestObjects.csproj" />
  </ItemGroup>

</Project>

netstandard2.0
真的
表达式树对象
泽夫·斯皮茨
表达式树对象
一组表达式树和System.Linq.Expressions中其他类型的实例,用于针对各种表达式树测试代码。这些对象由C#编译器、VB.NET编译器或System.Linq.Expressions.Expression上的工厂方法生成。
版权所有(c)2019 Zev Spitz
麻省理工学院
https://github.com/zspitz/ExpressionTreeToString
https://github.com/zspitz/ExpressionTreeToString
吉特
表达式树代码生成visual basic.net vb.net csharp测试数据到字符串
真的
真的
构建和打包似乎都很有效。但是,
.nupkg
文件似乎不包含引用的DLL


我如何解决此问题?我如何解决它?

我认为可以找到解决方案:


<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
  <ItemGroup>
    <BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
  </ItemGroup>
</Target>