blob: 342f65cdf0ca2c6b4bdbf8db78264a0907cd2f60 (
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
|
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="BuildUnifiedProduct">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " />
<PropertyGroup>
<SuppressBuildTarget>true</SuppressBuildTarget>
</PropertyGroup>
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.props" />
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.Product.props" />
<UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="ILMerge"/>
<PropertyGroup>
<TargetPath>$(ILMergeOutputAssembly)</TargetPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="stub.csproj;@(ProductProjects)">
<PrimaryProductOutput Condition=" '%(MergeIntoUnifiedAssembly)' != 'false' ">true</PrimaryProductOutput>
</ProjectReference>
<SignDependsOn Include="BuildUnifiedProduct" />
</ItemGroup>
<Target Name="BuildILMergeInputs" DependsOnTargets="ResolveReferences">
<ItemGroup>
<ILMergeProductInputAssemblies Include="@(ReferencePath)"
Condition=" '%(ReferencePath.PrimaryProductOutput)' == 'true' "/>
</ItemGroup>
</Target>
<Target Name="BuildUnifiedProductAssembly" DependsOnTargets="BuildILMergeInputs"
Inputs="@(ILMergeProductInputAssemblies);@(ILMergeInputAssemblies)" Outputs="$(ILMergeOutputAssembly);$(ILMergeOutputXmlDocs)">
<MakeDir Directories="$(ILMergeOutputAssemblyDirectory)" />
<Message Text="Merging $(ILMergeOutputAssembly)" Importance="high" />
<!-- Arrange for DNOA.Core to appear *last* in the input assemblies list so that its assembly attributes overrides the rest.
Also, this project's output must appear *first* in the list so that ILMerge will use its PE Header as the final one,
allowing file Properties in Windows Explorer to show DotNetOpenAuth.dll as the "Original Filename" along with other properties. -->
<ItemGroup>
<OrderedMergeInputAssemblies Include="@(ILMergeProductInputAssemblies)" Condition=" '%(ILMergeProductInputAssemblies.FileName)' == 'DotNetOpenAuth' " />
<OrderedMergeInputAssemblies Include="@(ILMergeProductInputAssemblies)" Condition=" '%(ILMergeProductInputAssemblies.FileName)' != 'DotNetOpenAuth.Core' and '%(ILMergeProductInputAssemblies.FileName)' != 'DotNetOpenAuth' " />
<OrderedMergeInputAssemblies Include="@(ILMergeInputAssemblies)" />
<OrderedMergeInputAssemblies Include="@(ILMergeProductInputAssemblies)" Condition=" '%(ILMergeProductInputAssemblies.FileName)' == 'DotNetOpenAuth.Core' " />
</ItemGroup>
<ILMerge
ExcludeFile="$(ProjectRoot)ILMergeInternalizeExceptions.txt"
InputAssemblies="@(OrderedMergeInputAssemblies)"
OutputFile="$(ILMergeOutputAssembly)"
SearchDirectories="@(ILMergeSearchDirectories)"
KeyFile="$(PublicKeyFile)"
DelaySign="true"
XmlDocumentation="true"
CopyAttributes="true"
AllowDuplicateAttributes="true"
ToolPath="$(ProjectRoot)tools\ILMerge"
TargetPlatformVersion="$(ClrVersion).0"
TargetPlatformDirectory="$(ILMergeTargetPlatformDirectory)" />
</Target>
<Target Name="BuildUnifiedProduct" DependsOnTargets="BuildUnifiedProductAssembly" />
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
</Project>
|