|
1 | 1 | <Project Sdk="Microsoft.Build.NoTargets">
|
| 2 | + |
2 | 3 | <PropertyGroup>
|
3 | 4 | <TargetFramework>$(NetCoreAppCurrent)-windows</TargetFramework>
|
4 | 5 | <IsShipping>false</IsShipping>
|
|
10 | 11 | <PackageDescription>Internal transport package to provide windowsdesktop with the assemblies from dotnet/runtime that make up the Microsoft.WindowsDesktop.App shared framework.</PackageDescription>
|
11 | 12 | <!-- Reference elements are missing from the nuspec: https://github.com/NuGet/Home/issues/8684. -->
|
12 | 13 | <NoWarn>$(NoWarn);NU5131;NU5128</NoWarn>
|
| 14 | + |
| 15 | + <!-- Generate the transport props file --> |
| 16 | + <BeforePack>$(BeforePack);GenerateTransportPropsFile</BeforePack> |
| 17 | + <TransportPropsFileInputPath>$(MSBuildThisFileDirectory)build\$(MSBuildProjectName).props</TransportPropsFileInputPath> |
| 18 | + <TransportPropsFileOutputPath>$(IntermediateOutputPath)$(MSBuildProjectName).props</TransportPropsFileOutputPath> |
13 | 19 | </PropertyGroup>
|
14 | 20 |
|
15 | 21 | <ItemGroup>
|
|
21 | 27 | Pack="true"
|
22 | 28 | Private="true"
|
23 | 29 | IncludeReferenceAssemblyInPackage="true" />
|
| 30 | + |
| 31 | + <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" /> |
24 | 32 | </ItemGroup>
|
| 33 | + |
| 34 | + <Target Name="GenerateTransportPropsFile" |
| 35 | + DependsOnTargets="BuildOnlySettings;ResolveReferences" |
| 36 | + Inputs="$(MSBuildThisFileFullPath);$(TransportPropsFileInputPath)" |
| 37 | + Outputs="$(TransportPropsFileOutputPath)"> |
| 38 | + <ItemGroup> |
| 39 | + <RuntimeWindowsDesktopPackageLibrary Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('Extension', '.dll')->WithMetadataValue('Pack', 'true')->WithMetadataValue('IsPackable', 'true'))" /> |
| 40 | + </ItemGroup> |
| 41 | + |
| 42 | + <PropertyGroup> |
| 43 | + <RuntimeWindowsDesktopPackageLibraries>@(RuntimeWindowsDesktopPackageLibrary->'<RuntimeWindowsDesktopPackageLibrary Include="%(Filename)%(Extension)" PackageId="%(PackageId)" PackageVersion="%(PackageVersion)" />', ' |
| 44 | + ')</RuntimeWindowsDesktopPackageLibraries> |
| 45 | + </PropertyGroup> |
| 46 | + |
| 47 | + <ItemGroup> |
| 48 | + <TransportPropsTemplateProperty Include="RuntimeWindowsDesktopPackageLibraries=$(RuntimeWindowsDesktopPackageLibraries)" /> |
| 49 | + </ItemGroup> |
| 50 | + |
| 51 | + <GenerateFileFromTemplate |
| 52 | + TemplateFile="$(TransportPropsFileInputPath)" |
| 53 | + Properties="@(TransportPropsTemplateProperty)" |
| 54 | + OutputPath="$(TransportPropsFileOutputPath)" /> |
| 55 | + |
| 56 | + <ItemGroup> |
| 57 | + <None Include="$(TransportPropsFileOutputPath)" Pack="true" PackagePath="build/" /> |
| 58 | + </ItemGroup> |
| 59 | + </Target> |
| 60 | + |
25 | 61 | </Project>
|
0 commit comments