forked from jamesathey/Core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCastle.Common.Targets
191 lines (155 loc) · 10.1 KB
/
Castle.Common.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?xml version="1.0" encoding="utf-8"?>
<!--
***********************************************************************************************
Common targets and properties for VS and external build files
Copyright 2004-2013 Castle Project - http://www.castleproject.org/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Overridable properties
-->
<PropertyGroup>
<Configuration Condition="$(Configuration)=='' or $(Configuration)=='Release'">NET40-Release</Configuration>
</PropertyGroup>
<!-- .NET 4.5 -->
<PropertyGroup Condition="$(Configuration) == 'NET45-Release' or $(Configuration) == 'NET45-Debug'">
<BuildConfigKey>NET45</BuildConfigKey>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<!-- .NET 4.0 (default) -->
<PropertyGroup Condition="$(Configuration) == 'NET40-Release' or $(Configuration) == 'NET40-Debug'">
<BuildConfigKey>NET40</BuildConfigKey>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<!-- .NET 3.5 -->
<PropertyGroup Condition="$(Configuration) == 'NET35-Release' or $(Configuration) == 'NET35-Debug'">
<BuildConfigKey>NET35</BuildConfigKey>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<!--Silverlight 4.0 runtime-->
<PropertyGroup Condition="$(Configuration) == 'SL40-Release' or $(Configuration) == 'SL40-Debug'">
<BuildConfigKey>SL40</BuildConfigKey>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<MSBuildTargets>Silverlight 4.0</MSBuildTargets>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<!--Silverlight 5.0 runtime-->
<PropertyGroup Condition="$(Configuration) == 'SL50-Release' or $(Configuration) == 'SL50-Debug'">
<BuildConfigKey>SL50</BuildConfigKey>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<MSBuildTargets>Silverlight 5.0</MSBuildTargets>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<BuildConfigDescription Condition=" '$(BuildConfigDescription)' == '' ">$(TargetFrameworkIdentifier) $(TargetFrameworkVersion)</BuildConfigDescription>
<BuildConfigDescription Condition=" '$(TargetFrameworkProfile)' != '' ">$(BuildConfigDescription) Client Profile</BuildConfigDescription>
</PropertyGroup>
<!-- Project folders -->
<PropertyGroup>
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' ==''">.NETFramework</TargetFrameworkIdentifier> <!-- MSBuild 4.0 defines this -->
<BuildPath Condition="$(BuildPath)==''">$(RootPath)/build</BuildPath>
<OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)/$(BuildConfigKey)/$(Configuration)/bin/</OutputPath>
<BuildScriptsPath Condition="'$(BuildScriptsPath)' ==''">$(RootPath)/buildscripts</BuildScriptsPath>
<ToolsPath Condition="'$(ToolsPath)' == ''">$(RootPath)/tools</ToolsPath>
<SolutionName Condition="'$(SolutionName)' == ''">$(ProjectName)</SolutionName>
<SolutionPath Condition="'$(SolutionPath)' == '' and '$(SolutionName)' != ''">$(RootPath)/$(SolutionName).sln</SolutionPath>
<SolutionPath Condition="'$(SolutionPath)' == ''">$(RootPath)/$(ProjectName).sln</SolutionPath>
<TestResultsPath Condition="'$(TestResultsPath)' == ''">$(OutputPath)test-results</TestResultsPath>
</PropertyGroup>
<!-- AssemblyInfo Properties -->
<PropertyGroup>
<AssemblyInfoFile Condition="'$(AssemblyInfoFile)' == ''">AssemblyInfo.cs</AssemblyInfoFile>
<AssemblyTitle Condition="'$(AssemblyTitle)' == ''">$(ProjectName) $(Project_Major).$(Project_Minor).$(Project_Build)$(BuildName) for $(BuildConfigDescription)</AssemblyTitle>
<AssemblyProduct Condition="'$(AssemblyProduct)' == ''">$(ProjectName)</AssemblyProduct>
<AssemblyDescription Condition="'$(AssemblyDescription)' != ''">$(AssemblyDescription)</AssemblyDescription>
<ComVisible Condition="'$(ComVisible)' == ''">false</ComVisible>
<CLSCompliant Condition="'$(CLSCompliant)' == ''">true</CLSCompliant>
<AllowPartiallyTrustedCallers Condition="'$(AllowPartiallyTrustedCallers)' == ''">false</AllowPartiallyTrustedCallers>
<!-- Assembly versioning. These can be overridden to vary file and assembly versions. -->
<AssemblyVersion_Major Condition="'$(AssemblyVersion_Major)' == ''">$(Project_Major)</AssemblyVersion_Major>
<AssemblyVersion_Minor Condition="'$(AssemblyVersion_Minor)' == ''">$(Project_Minor)</AssemblyVersion_Minor>
<AssemblyVersion_Build Condition="'$(AssemblyVersion_Build)' == ''">$(Project_Build)</AssemblyVersion_Build>
</PropertyGroup>
<!-- Signing Properties-->
<PropertyGroup>
<SignAssembly Condition="'$(SignAssembly)' == ''">true</SignAssembly>
<AssemblyOriginatorKeyFile>$(BuildScriptsPath)/CastleKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Versioning Properties -->
<PropertyGroup>
<!-- Picks up TeamCity's Build_Number property, or default to zero when not running under TeamCity -->
<Build_Number Condition="'$(Build_Number)' == ''">0</Build_Number>
<Build_Revision>$(Build_Number)</Build_Revision>
<BuildName Condition="'$(BuildName)' == ''">.$(Build_Revision)</BuildName>
</PropertyGroup>
<!-- Testing Properties -->
<PropertyGroup>
<TestRunner_Enabled Condition="'$(TestRunner_Enabled)' == ''">true</TestRunner_Enabled>
<!-- Controls whether tests are run -->
<TestRunner_Timeout Condition="'$(TestRunner_Timeout)' == ''">180000</TestRunner_Timeout>
<!-- Specifies the timeout for nunit -->
<TestRunner_ContinueOnError Condition="'$(TestRunner_ContinueOnError)' == ''">false</TestRunner_ContinueOnError>
<!-- Controls whether to continue the build if tests are failing -->
</PropertyGroup>
<ItemGroup>
<TestAssemblies Include="$(OutputPath)Castle.Core.Tests.dll" />
</ItemGroup>
<!-- 3rd Party Program Paths -->
<PropertyGroup>
<NUnitExecutable Condition="'$(NUnitExecutable)' == ''">nunit-console-x86.exe</NUnitExecutable>
<NUnitPath Condition="'$(NUnitPath)' == ''">$(ToolsPath)/NUnit/bin/</NUnitPath>
<MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)' == ''">$(ToolsPath)/MSBuildCommunityTasks</MSBuildCommunityTasksPath>
</PropertyGroup>
<!-- Re-define CoreCompileDependsOn to ensure the assemblyinfo files are updated before compilation. -->
<PropertyGroup>
<CoreCompileDependsOn>
$(CoreCompileDependsOn);
UpdateAssemblyInfoFiles
</CoreCompileDependsOn>
</PropertyGroup>
<!-- Import 3rd party targets -->
<Import Project="$(MSBuildCommunityTasksPath)/MSBuild.Community.Tasks.Targets" />
<!-- Updates the AssemblyInfo. The inputs are the same as the CoreCompileDependsOn target
to ensure that we only ever update the AssemblyInfo files if a compile is actually going to take place.-->
<Target
Name="UpdateAssemblyInfoFiles"
Inputs="$(MSBuildAllProjects);
@(Compile);
@(ManifestResourceWithNoCulture);
$(ApplicationIcon);
$(AssemblyOriginatorKeyFile);
@(ManifestNonResxWithNoCultureOnDisk);
@(ReferencePath);
@(CompiledLicenseFile);
@(EmbeddedDocumentation);
@(CustomAdditionalCompileInputs)"
Outputs="@(IntermediateAssembly);$(AssemblyInfoFile)"
>
<WriteLinesToFile File="$(AssemblyInfoFile)" Overwrite="true"
Lines='// ------------------------------------------------------------------------------
// <autogenerated>
// Changes to this file will be lost if the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------'
/>
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Runtime.InteropServices.ComVisible($(ComVisible))]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.CLSCompliant($(CLSCompliant))]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyTitle("$(AssemblyTitle)")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyDescription("$(AssemblyTitle)")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyProduct("$(AssemblyProduct)")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyVersion("$(AssemblyVersion_Major).$(AssemblyVersion_Minor).$(AssemblyVersion_Build).0")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyFileVersion("$(Project_Major).$(Project_Minor).$(Project_Build).$(Build_Revision)")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Reflection.AssemblyInformationalVersion("$(Project_Major).$(Project_Minor).$(Project_Build)$(BuildName)")]' />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Security.AllowPartiallyTrustedCallers]' Condition="$(AllowPartiallyTrustedCallers) and $(BuildConfigKey) != 'NET40'" />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Security.AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=System.Security.PartialTrustVisibilityLevel.NotVisibleByDefault)]' Condition="$(AllowPartiallyTrustedCallers) and $(BuildConfigKey) == 'NET40'" />
<WriteLinesToFile File="$(AssemblyInfoFile)" Lines='[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level2)]' Condition="$(AllowPartiallyTrustedCallers) and $(BuildConfigKey) == 'NET40'" />
</Target>
<!-- Run user targets last -->
<Import Condition="Exists('$(RootPath)/Common.User.Targets')" Project="$(RootPath)/Common.User.Targets" />
</Project>