|
16 | 16 | <SymbolPackageOutputPath>$(PackageOutputPath)</SymbolPackageOutputPath> |
17 | 17 | </PropertyGroup> |
18 | 18 |
|
19 | | - <!-- |
20 | | - We should not build some pkgproj in source-build (i.e. targeting-pack). |
21 | | - --> |
22 | | - <Target Name="GetSourceBuildSkipBuildProps" |
23 | | - Condition="'$(DotNetBuildFromSource)' == 'true' and '$(AlwaysBuildEvenInSourceBuild)' != 'true'" |
24 | | - BeforeTargets="GetSkipBuildProps"> |
25 | | - <PropertyGroup Condition="'$(FrameworkPackType)' == 'targeting'"> |
26 | | - <SkipBuild>true</SkipBuild> |
27 | | - </PropertyGroup> |
28 | | - </Target> |
29 | | - |
30 | | - <!-- |
31 | | - For any Dependency items with a VersionProp, set it to the property by that name given by the |
32 | | - version generation target. For any with a VersionFromProject, query the ProductVersion from that |
33 | | - project file and use it as the dependency's version. |
34 | | - --> |
35 | | - <Target Name="SetCustomPackageDependencyVersions" |
36 | | - BeforeTargets="GetPackageDependencies" |
37 | | - DependsOnTargets="GetProductVersions"> |
38 | | - <!-- |
39 | | - Generate a VersionProp name for each dependency with VersionFromProject. The batched MSBuild |
40 | | - task then generates the property, which is picked up by the VersionProp implementation. |
41 | | -
|
42 | | - Using PropertyName rather than ItemName on the MSBuild task avoids the difficulty in |
43 | | - reattaching the separate list of items back into the original Dependency items without any |
44 | | - reasonable Join operation available. |
45 | | - --> |
46 | | - <ItemGroup> |
47 | | - <Dependency |
48 | | - VersionProp="_VersionProp_$([System.String]::new('%(Dependency.Identity)').Replace('.', '_'))" |
49 | | - Condition="'%(Dependency.VersionFromProject)' != ''" /> |
50 | | - </ItemGroup> |
51 | | - |
52 | | - <MSBuild |
53 | | - Condition="'%(Dependency.VersionFromProject)' != ''" |
54 | | - Projects="%(Dependency.VersionFromProject)" |
55 | | - Targets="ReturnProductVersion"> |
56 | | - <Output TaskParameter="TargetOutputs" PropertyName="%(Dependency.VersionProp)" /> |
57 | | - </MSBuild> |
58 | | - |
59 | | - <!-- Use batching to use the value of an arbitrary property as the version. --> |
60 | | - <ItemGroup> |
61 | | - <Dependency Version="$(%(Dependency.VersionProp))" Condition="'%(Dependency.VersionProp)' != ''" /> |
62 | | - </ItemGroup> |
63 | | - </Target> |
64 | | - |
65 | | - <!-- |
66 | | - If the project is configured to use a shipped package version, set it. Use a target because we |
67 | | - need the versions from GetProductVersions. |
68 | | - --> |
69 | | - <Target Name="SetSpecificPackageVersion" |
70 | | - Condition="'$(VersionProp)' != ''" |
71 | | - BeforeTargets="GenerateNuSpec" |
72 | | - DependsOnTargets="GetProductVersions"> |
73 | | - <!-- Use item metadata: $(%(foo)) works, $($(foo)) doesn't. --> |
74 | | - <ItemGroup> |
75 | | - <VersionPropItem Include="$(VersionProp)" /> |
76 | | - </ItemGroup> |
77 | | - <PropertyGroup> |
78 | | - <Version>$(%(VersionPropItem.Identity))</Version> |
79 | | - </PropertyGroup> |
80 | | - </Target> |
81 | | - |
82 | 19 | <Target Name="SetTargetBasedPackageVersion" |
83 | | - Condition="'$(VersionProp)' == ''" |
84 | 20 | BeforeTargets="GenerateNuSpec" |
85 | 21 | DependsOnTargets="GetProductVersions"> |
86 | 22 | <PropertyGroup> |
|
118 | 54 | </ItemGroup> |
119 | 55 | </Target> |
120 | 56 |
|
121 | | - <Target Name="SetupFindSiblingSymbolFilesByNameForSymbolPackage"> |
122 | | - <ItemGroup> |
123 | | - <FindSiblingSymbolsForFile Include="@(File)" /> |
124 | | - </ItemGroup> |
125 | | - </Target> |
126 | | - |
127 | 57 | <!-- |
128 | 58 | Ensures package reports dir exists, to work around the issue in VerifyClosure task: |
129 | 59 | https://github.com/dotnet/arcade/issues/6090 |
|
0 commit comments