blob: 6515b46f9301fce0b4cec15bcbb3d15da4eb5353 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="dir.props" />
<Target Name="GetGenFacadesInputs">
<ItemGroup>
<NetFxContracts Include="@(NetFxReference->'$(NetFxRefPath)%(Identity).dll')" Condition="'$(TargetGroup)' != 'netfx'">
<StrongNameSig Condition="'%(NetfxReference.StrongNameSig)' == ''">StrongName</StrongNameSig>
<StrongNameSig Condition="'%(NetfxReference.StrongNameSig)' != ''">%(NetfxReference.StrongNameSig)</StrongNameSig>
</NetFxContracts>
<NETStandardContracts Include="$(NetStandardRefPath)netstandard.dll" />
<GenFacadesContracts Include="@(NetFxContracts);@(NETStandardContracts)" />
<GenFacadesSeeds Include="$(RefPath)*.dll" />
</ItemGroup>
</Target>
<PropertyGroup>
<GenFacadesResponseFile>$(IntermediateOutputPath)genfacades.rsp</GenFacadesResponseFile>
<GenFacadesSemaphoreFile>$(IntermediateOutputPath)genfacades.sempahore</GenFacadesSemaphoreFile>
</PropertyGroup>
<!-- Generate Facades -->
<Target Name="RunGenFacades"
DependsOnTargets="GetGenFacadesInputs"
Inputs="@(GenFacadesContracts);@(GenFacadeSeeds)"
Outputs="$(GenFacadesSemaphoreFile)">
<PropertyGroup>
<!--<GenFacadesArgs>$(GenFacadesArgs) -contracts:"@(GenFacadesContracts, ',')"</GenFacadesArgs>-->
<GenFacadesArgs>$(GenFacadesArgs) -seeds:"@(GenFacadesSeeds, ',')"</GenFacadesArgs>
<GenFacadesArgs>$(GenFacadesArgs) -facadePath:"$(GenFacadesOutputPath)"</GenFacadesArgs>
<GenFacadesArgs>$(GenFacadesArgs) -producePdb:false</GenFacadesArgs>
<GenFacadesArgs>$(GenFacadesArgs) -assemblyFileVersion:$(AssemblyFileVersion)</GenFacadesArgs>
<GenFacadesArgs>$(GenFacadesArgs) -forceZeroVersionSeeds</GenFacadesArgs>
<!-- TODO: We should remove this flag once we have all the types for netstandard -->
<GenFacadesArgs>$(GenFacadesArgs) -ignoreMissingTypes</GenFacadesArgs>
</PropertyGroup>
<MakeDir Directories="$(IntermediateOutputPath)" />
<WriteLinesToFile File="$(GenFacadesResponseFile)" Lines="$(GenFacadesArgs)" Overwrite="true" />
<PropertyGroup>
<GenFacadesCmd>$(ToolHostCmd) "$(ToolsDir)GenFacades.exe"</GenFacadesCmd>
</PropertyGroup>
<Exec Condition="'@(NetFxContracts)' != ''"
Command="$(GenFacadesCmd) -contracts:"@(NetFxContracts)" @"$(GenFacadesResponseFile)""
WorkingDirectory="$(ToolRuntimePath)" />
<Exec Condition="'@(NETStandardContracts)' != ''"
Command="$(GenFacadesCmd) -contracts:"@(NETStandardContracts)" @"$(GenFacadesResponseFile)""
WorkingDirectory="$(ToolRuntimePath)" />
<WriteSigningRequired
Condition="'@(NetFxContracts)' != '' and '$(SkipSigning)' != 'true' and '$(SignType)' != 'oss'"
AuthenticodeSig="Microsoft"
StrongNameSig="%(NetFxContracts.StrongNameSig)"
MarkerFile="$(GenFacadesOutputPath)%(NetFxContracts.Filename)%(NetFxContracts.Extension).requires_signing" />
<WriteSigningRequired
Condition="'@(NETStandardContracts)' != '' and '$(SkipSigning)' != 'true' and '$(SignType)' != 'oss'"
AuthenticodeSig="Microsoft"
StrongNameSig="Open"
MarkerFile="$(GenFacadesOutputPath)%(NETStandardContracts.Filename)%(NETStandardContracts.Extension).requires_signing" />
<Touch Files="$(GenFacadesSemaphoreFile)" AlwaysCreate="true" />
</Target>
<Target Name="Build" DependsOnTargets="RunGenFacades;BinPlace" />
<Target Name="Clean">
<RemoveDir Directories="$(IntermediateOutputPath);$(GenFacadesOutputPath)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<Target Name="GetBinPlaceItems">
<ItemGroup>
<BinPlaceItem Include="$(GenFacadesOutputPath)*.dll" />
<FileWrites Include="@(BinPlaceItem)" />
</ItemGroup>
</Target>
</Project>
|