1
1
<Project Sdk =" Microsoft.NET.Sdk" DefaultTargets =" Pack" >
2
2
<Import Project =" $(RepoRoot)eng/pkg/Pack.props" />
3
-
4
3
<PropertyGroup >
5
4
<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> -->
7
10
<NoWarn >$(NoWarn);NU5127;NU5128</NoWarn >
8
11
<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 >
9
13
</PropertyGroup >
10
-
11
14
<ItemGroup >
12
15
<ProjectReference Include =" ../Microsoft.ML.DataView/Microsoft.ML.DataView.csproj" />
13
16
<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" />
15
42
<PackageReference Include =" Newtonsoft.Json" Version =" $(NewtonsoftJsonPackageVersion)" />
16
43
<PackageReference Include =" System.Reflection.Emit.Lightweight" Version =" $(SystemReflectionEmitLightweightPackageVersion)" />
17
44
<PackageReference Include =" System.CodeDom" Version =" $(SystemCodeDomPackageVersion)" />
18
45
<PackageReference Include =" System.Memory" Version =" $(SystemMemoryVersion)" />
19
46
<PackageReference Include =" System.Collections.Immutable" Version =" $(SystemCollectionsImmutableVersion)" />
20
47
<PackageReference Include =" System.Threading.Channels" Version =" $(SystemThreadingChannelsPackageVersion)" />
21
48
</ItemGroup >
22
-
23
49
<ItemGroup >
24
50
<Content Include =" $(RepoRoot)eng\pkg\CommonPackage.props" Pack =" true" PackagePath =" build\netstandard2.0\$(MSBuildProjectName).props" />
25
51
<Content Include =" build\**\*" Pack =" true" PackagePath =" build" />
26
52
</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