forked from dotnet/wcf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFacadeAssemblies.targets
36 lines (31 loc) · 1.86 KB
/
FacadeAssemblies.targets
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
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(IsPartialFacadeAssembly)'=='true'">
<!--Don't produce or publish symbols for Facade assemblies.-->
<PublishWindowsPdb>false</PublishWindowsPdb>
<!-- GenFacades requires a PDB -->
<DebugType>portable</DebugType>
<NoWarn Condition="'$(IsReferenceAssembly)' == 'true'">$(NoWarn);0436</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)'=='true'">
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<!--This is where we tell GenFacades what Ref assembly to look for.-->
<Target Condition="'$(IsPartialFacadeAssembly)'=='true' AND '$(IsReferenceAssembly)' != 'true'" Name="ResolveMatchingContract" AfterTargets="ResolvePackageDependenciesForBuild">
<ItemGroup Condition="'$(AssemblyName)'!='System.ServiceModel'">
<ProjectReference Include="..\ref\$(AssemblyName).Ref.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>ResolvedMatchingContract</OutputItemType>
</ProjectReference>
</ItemGroup>
</Target>
<!-- This property will break if we're packing a global tool, so skip it in that case. -->
<PropertyGroup Condition="'$(PackAsTool)' != 'true'">
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificBuildOutput);AddReferenceAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<Target Condition="'$(IsPartialFacadeAssembly)'=='true'" Name="AddReferenceAssemblyToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
<TfmSpecificPackageFile Include="@(ResolvedMatchingContract)" PackagePath="ref/$(TargetFramework)" />
</ItemGroup>
</Target>
</Project>