summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets
diff options
context:
space:
mode:
Diffstat (limited to '.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets')
-rwxr-xr-x.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets88
1 files changed, 88 insertions, 0 deletions
diff --git a/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets
new file mode 100755
index 0000000000..8c7be79a35
--- /dev/null
+++ b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/partialfacades.task.targets
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <UsingTask TaskName="GenFacadesTask" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+
+ <!-- Hook both partial-facade-related targets into TargetsTriggeredByCompilation. This will cause them
+ to only be invoked upon a successful compilation; they can conceptualized as an extension
+ of the assembly compilation process.
+ -->
+ <PropertyGroup>
+ <TargetsTriggeredByCompilation Condition="'$(IsPartialFacadeAssembly)' == 'true' and '$(DesignTimeBuild)' != 'true'">
+ $(TargetsTriggeredByCompilation);FillPartialFacadeUsingTask
+ </TargetsTriggeredByCompilation>
+ </PropertyGroup>
+
+ <!-- FillPartialFacade
+ Inputs:
+ * An "input assembly"
+ * A contract assembly
+ * Seed assemblies
+
+ Fills the "input assembly" by finding types in the contract assembly that are missing from it, and adding type-forwards
+ to those matching types in the seed assemblies.
+ -->
+ <Target Name="FillPartialFacadeUsingTask" DependsOnTargets="$(FillPartialFacadeDependsOn)">
+
+ <ItemGroup>
+ <!-- References used for compilation are automatically included as seed assemblies -->
+ <GenFacadesSeeds Include="@(ReferencePath)" />
+ </ItemGroup>
+
+ <Error Text="No single matching contract found." Condition="'$(IsReferenceAssembly)' != 'true' AND '@(ResolvedMatchingContract->Count())' != '1'" />
+
+ <MakeDir Directories="$(GenFacadesInputPath)" />
+
+ <!-- Move the assembly into a subdirectory for GenFacades -->
+ <Move SourceFiles="$(PartialFacadeAssemblyPath)"
+ DestinationFolder="$(GenFacadesInputPath)"
+ />
+
+ <PropertyGroup>
+ <ProducePdb>true</ProducePdb>
+ <!-- Partial facade PDB generation only functions on Windows -->
+ <ProducePdb Condition="'$(DebugSymbols)' == 'false' OR '$(RunningOnUnix)' == 'true'">false</ProducePdb>
+ <GenFacadesIgnoreMissingTypes Condition="'$(GenFacadesIgnoreMissingTypes)' == ''">false</GenFacadesIgnoreMissingTypes>
+ <GenFacadesIgnoreBuildAndRevisionMismatch Condition="'$(GenFacadesIgnoreBuildAndRevisionMismatch)' == ''">false</GenFacadesIgnoreBuildAndRevisionMismatch>
+ </PropertyGroup>
+
+ <!-- Move the PDB into a subdirectory for GenFacades if we are producing PDBs -->
+ <Move SourceFiles="$(PartialFacadeSymbols)"
+ DestinationFolder="$(GenFacadesInputPath)"
+ Condition="$(ProducePdb)" />
+
+ <PropertyGroup Condition="'$(IsReferenceAssembly)' != 'true'">
+ <GenFacadesPartialFacadeAssemblyPath>$(GenFacadesInputAssembly)</GenFacadesPartialFacadeAssemblyPath>
+ <GenFacadesContracts>%(ResolvedMatchingContract.Identity)</GenFacadesContracts>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IsReferenceAssembly)' == 'true'">
+ <GenFacadesContracts>$(GenFacadesInputAssembly)</GenFacadesContracts>
+ <GenFacadesBuildPartialReferenceFacade>true</GenFacadesBuildPartialReferenceFacade>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <FileWrites Include="$(GenFacadesInputAssembly)" />
+ <FileWrites Include="$(GenFacadesInputSymbols)" />
+ </ItemGroup>
+
+ <GenFacadesTask
+ PartialFacadeAssemblyPath="$(GenFacadesPartialFacadeAssemblyPath)"
+ Contracts="$(GenFacadesContracts)"
+ Seeds="@(GenFacadesSeeds, ',')"
+ FacadePath="$(GenFacadesOutputPath.TrimEnd('/'))"
+ SeedTypePreferencesUnsplit="@(SeedTypePreference)"
+ ProducePdb="$(ProducePdb)"
+ ClearBuildAndRevision="$(GenFacadesClearBuildAndRevision)"
+ IgnoreMissingTypes="$(GenFacadesIgnoreMissingTypes)"
+ IgnoreBuildAndRevisionMismatch="$(GenFacadesIgnoreBuildAndRevisionMismatch)"
+ BuildDesignTimeFacades="$(GenFacadesBuildDesignTimeFacades)"
+ InclusionContracts="$(GenFacadesInclusionContracts)"
+ SeedLoadErrorTreatment="$(GenFacadesSeedLoadErrorTreatment)"
+ ContractLoadErrorTreatment="$(GenFacadesContractLoadErrorTreatment)"
+ ForceZeroVersionSeeds="$(GenFacadesForceZeroVersionSeeds)"
+ BuildPartialReferenceFacade="$(GenFacadesBuildPartialReferenceFacade)"
+ />
+ </Target>
+
+</Project>