-
Notifications
You must be signed in to change notification settings - Fork 1
/
ProvideMultiplatformVersions.proj
46 lines (42 loc) · 2.46 KB
/
ProvideMultiplatformVersions.proj
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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SLPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\$(TargetFrameworkProfile)</SLPath>
<NETFwkPath>C:\Windows\Microsoft.NET\Framework\v4.0.30319</NETFwkPath>
<MergedOutDir Condition="'$(MergedOutDir)'==''">$(ProjectDir)$(OutDir)</MergedOutDir>
<RunMerge Condition="'$(RunMerge)'==''">OnOutputUpdated</RunMerge>
</PropertyGroup>
<Target Name="BeforeCompile">
<PropertyGroup>
<AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)</AssemblyTimestampBeforeCompile>
</PropertyGroup>
</Target>
<Target Name="AfterCompile">
<PropertyGroup>
<AssemblyTimestampAfterCompile>%(IntermediateAssembly.ModifiedTime)</AssemblyTimestampAfterCompile>
</PropertyGroup>
</Target>
<Target Name="DefineSLProperties">
<PropertyGroup>
<FwkLibPath>$(SLPath)</FwkLibPath>
<Suffix>.dll</Suffix>
</PropertyGroup>
</Target>
<Target Name="DefineNetProperties">
<PropertyGroup>
<FwkLibPath>$(NetFwkPath)</FwkLibPath>
<Suffix>.dll</Suffix>
</PropertyGroup>
</Target>
<Target Name="BuildPlatformVersion" Condition="'$(RunMerge)'!='OnOutputUpdated' or '$(AssemblyTimestampBeforeCompile)'!='$(AssemblyTimestampAfterCompile)'">
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='false' and '$(FwkLibPath)\.'!='%(RootDir)%(Directory).'">
<Output TaskParameter="Include" ItemName="libPaths" />
</CreateItem>
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true'">
<Output TaskParameter="Include" ItemName="IlmergeAssemblies" />
</CreateItem>
<Exec Command=""$(ProjectDir)..\Dependencies\ILMerge\Ilmerge.exe" /target:library /lib:"$(FwkLibPath)" @(libPaths->'"/lib:%(RootDir)%(Directory)."', ' ') "/targetplatform:v2,$(FwkLibPath)" "/out:$(MergedOutDir)$(RootNamespace)$(Suffix)" "$(ProjectDir)@(IntermediateAssembly)" @(IlmergeAssemblies->'"%(FullPath)"', ' ')"/> <!-- "/log:$(ProjectDir)ilmerge.log"" /> -->
<Message Importance="High" Text="$(MSBuildProjectName) -> $(RootNamespace)$(Suffix)" />
</Target>
<Target Name="BuildSLVersion" DependsOnTargets="DefineSLProperties;BuildPlatformVersion" />
<Target Name="BuildNetVersion" DependsOnTargets="DefineNetProperties;BuildPlatformVersion" />
</Project>