11<Project Sdk =" Microsoft.NET.Sdk" DefaultTargets =" Pack" >
22 <Import Project =" $(RepoRoot)eng/pkg/Pack.props" />
3-
43 <PropertyGroup >
54 <TargetFramework >netstandard2.0</TargetFramework >
6- <IncludeBuildOutput >false</IncludeBuildOutput >
5+ <!-- To include the DLL and PDBs of the underlying projects
6+ We need to remove the IncludeBuildOutput=false. This also generates a
7+ Microsoft.ML.dll in the nuget package, and a Microsoft.ML.pdb in the .snupkg
8+ But these are to be ignored, as they don't contain anything meaningful-->
9+ <!-- <IncludeBuildOutput>false</IncludeBuildOutput> -->
710 <NoWarn >$(NoWarn);NU5127;NU5128</NoWarn >
811 <PackageDescription >ML.NET is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers.</PackageDescription >
12+ <TargetsForTfmSpecificBuildOutput >$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput >
913 </PropertyGroup >
10-
1114 <ItemGroup >
1215 <ProjectReference Include =" ../Microsoft.ML.DataView/Microsoft.ML.DataView.csproj" />
1316 <ProjectReference Include =" ../Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj" />
14-
17+ <ProjectReference Include =" ../Microsoft.ML.Core/Microsoft.ML.Core.csproj" >
18+ <IncludeInNuget >true</IncludeInNuget >
19+ <PrivateAssets >all</PrivateAssets >
20+ </ProjectReference >
21+ <ProjectReference Include =" ../Microsoft.ML.Data/Microsoft.ML.Data.csproj" >
22+ <IncludeInNuget >true</IncludeInNuget >
23+ <PrivateAssets >all</PrivateAssets >
24+ </ProjectReference >
25+ <ProjectReference Include =" ../Microsoft.ML.KMeansClustering/Microsoft.ML.KMeansClustering.csproj" >
26+ <IncludeInNuget >true</IncludeInNuget >
27+ <PrivateAssets >all</PrivateAssets >
28+ </ProjectReference >
29+ <ProjectReference Include =" ../Microsoft.ML.PCA/Microsoft.ML.PCA.csproj" >
30+ <IncludeInNuget >true</IncludeInNuget >
31+ <PrivateAssets >all</PrivateAssets >
32+ </ProjectReference >
33+ <ProjectReference Include =" ../Microsoft.ML.StandardTrainers/Microsoft.ML.StandardTrainers.csproj" >
34+ <IncludeInNuget >true</IncludeInNuget >
35+ <PrivateAssets >all</PrivateAssets >
36+ </ProjectReference >
37+ <ProjectReference Include =" ../Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj" >
38+ <IncludeInNuget >true</IncludeInNuget >
39+ <PrivateAssets >all</PrivateAssets >
40+ </ProjectReference >
41+ <NativeAssemblyReference Include =" LdaNative" />
1542 <PackageReference Include =" Newtonsoft.Json" Version =" $(NewtonsoftJsonPackageVersion)" />
1643 <PackageReference Include =" System.Reflection.Emit.Lightweight" Version =" $(SystemReflectionEmitLightweightPackageVersion)" />
1744 <PackageReference Include =" System.CodeDom" Version =" $(SystemCodeDomPackageVersion)" />
1845 <PackageReference Include =" System.Memory" Version =" $(SystemMemoryVersion)" />
1946 <PackageReference Include =" System.Collections.Immutable" Version =" $(SystemCollectionsImmutableVersion)" />
2047 <PackageReference Include =" System.Threading.Channels" Version =" $(SystemThreadingChannelsPackageVersion)" />
2148 </ItemGroup >
22-
2349 <ItemGroup >
2450 <Content Include =" $(RepoRoot)eng\pkg\CommonPackage.props" Pack =" true" PackagePath =" build\netstandard2.0\$(MSBuildProjectName).props" />
2551 <Content Include =" build\**\*" Pack =" true" PackagePath =" build" />
2652 </ItemGroup >
27- </Project >
53+ <PropertyGroup >
54+ <!-- Include Project References output-->
55+ <TargetsForTfmSpecificBuildOutput >$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput >
56+ </PropertyGroup >
57+ <Target DependsOnTargets =" ResolveReferences" Name =" CopyProjectReferencesToPackage" >
58+ <ItemGroup >
59+ <!-- Include DLLs of Project References-->
60+ <BuildOutputInPackage Include =" @(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('IncludeInNuget','true'))" />
61+ <!-- Include PDBs of Project References-->
62+ <BuildOutputInPackage Include =" @(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('IncludeInNuget','true')->Replace('.dll', '.pdb'))" />
63+ <!-- Include PDBs for Native binaries-->
64+ <!-- The path needed to be hardcoded for this to work on our publishing CI-->
65+ <BuildOutputInPackage Condition =" Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb')" Include =" $(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb" TargetPath =" ..\..\runtimes\win-x86\native" />
66+ <BuildOutputInPackage Condition =" Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb')" Include =" $(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb" TargetPath =" ..\..\runtimes\win-x64\native" />
67+ </ItemGroup >
68+ </Target >
69+ </Project >
0 commit comments