forked from BrightstarDB/BrightstarDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.proj
98 lines (86 loc) · 3.66 KB
/
common.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
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
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Import CommunityTasks -->
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<!-- Common targets for Brightstar projects -->
<PropertyGroup>
<AssemblyProduct>BrightstarDB</AssemblyProduct>
<AssemblyCompany></AssemblyCompany>
<AssemblyCopyright>Copyright (c) 2014 Khalil Ahmed, Graham Moore, and other contributors</AssemblyCopyright>
<AssemblyTrademark>All rights reserved</AssemblyTrademark>
<AssemblyTitle></AssemblyTitle>
</PropertyGroup>
<!-- BrightstarDB Version Number. Now hardcoded to avoid problems
with the MSBuild Community Tasks Version task under monodevelop -->
<PropertyGroup>
<Major>1</Major>
<Minor>8</Minor>
<Build>0</Build>
<Revision>0</Revision>
</PropertyGroup>
<ItemGroup>
<PropertyFiles Include="**\AssemblyInfo.cs"/>
</ItemGroup>
<Target Name="CleanAssemblyInfos">
<Delete Files="@(PropertyFiles)"/>
</Target>
<Target Name="GenerateAssemblyInfo">
<Message Text="GenerateAssemblyInfo" />
<CreateItem Include="$(AssemblyInfoFile)">
<Output ItemName="AssemblyInfoFileItem" TaskParameter="Include"/>
</CreateItem>
<MakeDir Directories="%(AssemblyInfoFileItem.RootDir)%(AssemblyInfoFileItem.Directory)" />
<AssemblyInfo
Condition="( '$(Configuration)' == 'Release' ) Or (!Exists('$(AssemblyInfoFile)'))"
CodeLanguage="CS"
OutputFile="$(AssemblyInfoFile)"
AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyFileVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyProduct="$(AssemblyProduct)"
AssemblyCompany="$(AssemblyCompany)"
AssemblyCopyright="$(AssemblyCopyright)"
AssemblyTrademark="$(AssemblyTrademark)"
AssemblyTitle="$(AssemblyTitle)"/>
</Target>
<!-- Sets a property named 'Timestamp' to the current Date/Time -->
<Target Name='GenerateTimestamp'>
<Time Format="yyyyMMddHHmmss">
<Output TaskParameter="FormattedTime" PropertyName="Timestamp" />
</Time>
</Target>
<Target Name="PolicyFiles"
Inputs="@(PolicyFiles)"
Outputs="@(PolicyFiles -> '$(OutputPath)%(Filename).$(AssemblyName).dll')">
<Copy SourceFiles="%(PolicyFiles.relativedir)%(PolicyFiles.Filename)%(PolicyFiles.extension)"
DestinationFiles="$(OutputPath)%(PolicyFiles.Filename).$(AssemblyName).config"/>
<XmlUpdate
Prefix="asm"
Namespace="urn:schemas-microsoft-com:asm.v1"
XPath="//asm:bindingRedirect/@newVersion"
XmlFileName="$(OutputPath)%(PolicyFiles.Filename).$(AssemblyName).config"
Value="$(AssemblyVersion)"/>
<XmlUpdate
Prefix="asm"
Namespace="urn:schemas-microsoft-com:asm.v1"
XPath="//asm:assemblyIdentity/@name"
XmlFileName="$(OutputPath)%(PolicyFiles.Filename).$(AssemblyName).config"
Value="$(AssemblyName)"/>
<GetFrameworkSdkPath>
<Output
TaskParameter="FrameworkSdkVersion35Path"
PropertyName="SdkPath" />
</GetFrameworkSdkPath>
<AL Version="$(AssemblyVersion)"
FileVersion="$(AssemblyFileVersion)"
KeyFile="$(AssemblyKeyFile)"
OutputAssembly="$(OutputPath)%(PolicyFiles.Filename).$(AssemblyName).dll"
LinkResources="$(OutputPath)%(PolicyFiles.Filename).$(AssemblyName).config"
ToolPath="$(SdkPath)bin\"/>
</Target>
<Target Name="CleanPolicyFiles">
<CreateItem Include="**\policy.*.dll;**\policy.*.config">
<Output ItemName="PolicyFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(PolicyFiles)" />
</Target>
</Project>