-
Notifications
You must be signed in to change notification settings - Fork 33
/
Uno.CrossTargeting.props
32 lines (24 loc) · 2.1 KB
/
Uno.CrossTargeting.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<Project>
<Import Project="$(SolutionDir)\crosstargeting_override.props" Condition="exists('$(SolutionDir)\crosstargeting_override.props')" />
<Target Name="_DisplayTargets" BeforeTargets="BeforeBuild">
<Message Text="Building target framework: $(TargetFramework)" Importance="high" Condition="'$(TargetFramework)'!=''" />
</Target>
<Target Name="_UnoOverrideNuget" AfterTargets="AfterBuild" DependsOnTargets="BuiltProjectOutputGroup" Condition="'$(NugetOverrideVersion)'!=''">
<PropertyGroup>
<_TargetNugetPackageId Condition="'$(PackageId)'!=''">$(PackageId)</_TargetNugetPackageId>
<_TargetNugetPackageId Condition="'$(PackageId)'==''">$(AssemblyName)</_TargetNugetPackageId>
<_TargetNugetFolderBase>$(USERPROFILE)\.nuget\packages\$(_TargetNugetPackageId)\$(NugetOverrideVersion)\lib</_TargetNugetFolderBase>
<_TargetNugetFolder>$(_TargetNugetFolderBase)\$(TargetFramework)</_TargetNugetFolder>
</PropertyGroup>
<ItemGroup>
<_OutputFiles Include="@(BuiltProjectOutputGroupOutput)" />
<_OutputFilesPDB Include="@(_OutputFiles->'%(RootDir)\%(Directory)\%(RecursiveDir)%(Filename).pdb')" Condition="Exists('@(BuiltProjectOutputGroupOutput->'%(RootDir)\%(Directory)\%(RecursiveDir)%(Filename).pdb')')" />
</ItemGroup>
<MakeDir Directories="$(_TargetNugetFolder)\" />
<Message Importance="high" Text="OVERRIDING NUGET PACKAGE CACHE: $(_TargetNugetFolder) [and $(TargetPlatformVersion)]" />
<Copy SourceFiles="@(_OutputFiles)" DestinationFiles="@(_OutputFiles->'$(_TargetNugetFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(_OutputFilesPDB)" DestinationFiles="@(_OutputFilesPDB->'$(_TargetNugetFolder)\%(RecursiveDir)%(Filename).pdb')" />
<Copy Condition="'$(TargetPlatformVersion)'!=''" SourceFiles="@(_OutputFiles)" DestinationFiles="@(_OutputFiles->'$(_TargetNugetFolder)$(TargetPlatformVersion)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy Condition="'$(TargetPlatformVersion)'!=''" SourceFiles="@(_OutputFilesPDB)" DestinationFiles="@(_OutputFilesPDB->'$(_TargetNugetFolder)$(TargetPlatformVersion)\%(RecursiveDir)%(Filename).pdb')" />
</Target>
</Project>