1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <project name =" Ninject.NLog4" default =" all" >
3+ <property name =" product.assembly.NLog4" value =" ${product.name}.NLog4.dll" overwrite =" false" />
4+ <property name =" product.assembly.test.NLog4" value =" ${product.name}.NLog4.Test.dll" overwrite =" false" />
5+
6+ <target name =" buildNLog4" unless =" ${string::contains(build.platform, 'silverlight-4.0-wp') or string::contains(build.platform, 'silverlight-3.0') or string::contains(build.platform, 'silverlight-2.0')}" >
7+ <property name =" packagepath.NLog4" value =" nlog.4.*/lib/${nuget.platform}" unless =" ${string::contains(build.platform, 'mono')}" />
8+ <property name =" packagepath.NLog4" value =" nlog.4.*/lib/net35" if =" ${string::contains(build.platform, 'mono')}" />
9+ <property name =" packagepath.NLog4" value =" nlog.4.*/lib/net40" if =" ${build.platform == 'net-4.0'}" />
10+ <property name =" packagepath.NLog4" value =" nlog.4.*/lib/net45" if =" ${string::contains(build.platform, 'net-4.5')}" />
11+
12+ <property name =" current.path.lib.NLog4" value =" ${path.packages}/${packagepath.NLog4}" />
13+
14+ <copy todir =" ${current.path.build}/NLog4/lib" >
15+ <fileset basedir =" ${path.packages}" >
16+ <include name =" ${packagepath.NLog4}/*.dll" />
17+ <include name =" ${packagepath.NLog4}/*.xml" />
18+ </fileset >
19+ </copy >
20+
21+ <csc noconfig =" true" warnaserror =" true" target =" library" debug =" ${build.debug}" optimize =" ${build.optimize}" define =" ${build.defines}"
22+ output =" ${current.path.build}/NLog4/${product.assembly.NLog4}"
23+ doc =" ${current.path.build}/NLog4/${product.name}.NLog4.xml" keyfile =" ${path.src}/${product.keyfile}" >
24+ <arg line =" /filealign:512" />
25+ <arg value =" -sdk:2" if =" ${string::contains(build.platform, 'mono-3.5')}" />
26+ <arg value =" -sdk:4" if =" ${string::contains(build.platform, 'mono-4.0')}" />
27+ <sources basedir =" ${path.src}" >
28+ <include name =" ${build.asminfo}" />
29+ <include name =" ${product.name}.NLog4/**/*.cs" />
30+ </sources >
31+ <references >
32+ <include name =" mscorlib.dll" />
33+ <include name =" System.dll" />
34+ <include name =" System.Core.dll" />
35+ <include name =" System.Web.dll" unless =" ${build.platform == 'silverlight-2.0'}" />
36+ <include name =" ${current.path.lib.NLog4}/NLog.dll" />
37+ <include name =" ${path.lib}/Ninject/${build.platform}/Ninject.dll" />
38+ <include name =" ${current.path.build}/${product.assembly}" />
39+ </references >
40+ </csc >
41+ </target >
42+
43+ <target name =" compile-NLog4-tests" depends =" core compile-tests" unless =" ${skip.tests}" if =" ${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}" >
44+ <property name =" current.path.test.NLog4" value =" ${path.build}/${build.platform}/tests/NLog4" />
45+ <mkdir dir =" ${current.path.test.NLog4}" />
46+
47+ <property name =" target" value =" ${current.path.test.NLog4}" />
48+ <call target =" CopyXUnit-Target" />
49+ <call target =" CopyMoq-Target" />
50+ <call target =" CopyFluentAssertions-Target" />
51+ <copy todir =" ${current.path.test.NLog4}" flatten =" true" >
52+ <fileset basedir =" ${current.path.test}" >
53+ <include name =" *.dll" />
54+ </fileset >
55+ </copy >
56+ <copy todir =" ${current.path.test.NLog4}" flatten =" true" >
57+ <fileset basedir =" ${current.path.build}/NLog4" >
58+ <include name =" **/*.dll" />
59+ </fileset >
60+ </copy >
61+
62+ <csc noconfig =" true" warnaserror =" true" target =" library" debug =" ${build.debug}" optimize =" ${build.optimize}" define =" ${build.defines}"
63+ output =" ${current.path.test.NLog4}/${product.assembly.test.NLog4}" >
64+ <arg value =" -sdk:2" if =" ${string::contains(build.platform, 'mono-3.5')}" />
65+ <arg value =" -sdk:4" if =" ${string::contains(build.platform, 'mono-4.0')}" />
66+ <sources basedir =" ${path.src}" >
67+ <include name =" ${product.name}.NLog4.Test/**/*.cs" />
68+ </sources >
69+ <references basedir =" ${current.path.test.NLog4}" >
70+ <include name =" mscorlib.dll" />
71+ <include name =" System.dll" />
72+ <include name =" System.Core.dll" />
73+ <include name =" Moq.dll" />
74+ <include name =" xunit.dll" />
75+ <include name =" FluentAssertions.dll" />
76+ <include name =" ${current.path.lib.NLog4}/NLog.dll" />
77+ <include name =" ${product.assembly}" />
78+ <include name =" ${product.assembly.NLog4}" />
79+ <include name =" ${current.path.test}/${product.assembly.test}" />
80+ <include name =" ${path.lib}/Ninject/${build.platform}/Ninject.dll" />
81+ </references >
82+ <nowarn >
83+ <warning number =" 1584" />
84+ </nowarn >
85+ </csc >
86+ </target >
87+
88+ <target name =" testNLog4" depends =" compile-NLog4-tests" unless =" ${skip.tests}" if =" ${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}" >
89+ <exec
90+ program =" ${path.tools.xunit.console}"
91+ workingdir=" ${current.path.test.NLog4}"
92+ failonerror=" true"
93+ if=" ${not(string::contains(build.platform, 'mono')) or teamcity}" >
94+ <arg value =" ${product.assembly.test.NLog4}" />
95+ <arg value =" /html" />
96+ <arg path =" ${current.path.test.NLog4}/results.html" />
97+ </exec >
98+
99+ <if test =" ${string::contains(build.platform, 'mono') and not(teamcity)}" >
100+ <exec
101+ program=" ${framework::get-runtime-engine(framework::get-target-framework())}"
102+ workingdir=" ${current.path.test.NLog4}"
103+ failonerror=" true" >
104+ <arg value =" ${path.tools.xunit.console}" />
105+ <arg value =" ${product.assembly.test.NLog4}" />
106+ <arg value =" /html" />
107+ <arg path =" ${current.path.test.NLog4}/results.html" />
108+ </exec >
109+ </if >
110+ </target >
111+
112+ <target name =" compile-silverlight-tests-NLog4" depends =" core" unless =" ${skip.tests or skip.silverlightTests}" if =" ${string::contains(build.platform, 'silverlight') and not(string::contains(build.platform, 'silverlight-4.0-wp') or string::contains(build.platform, 'silverlight-3.0') or string::contains(build.platform, 'silverlight-2.0'))}" >
113+ <property name =" current.path.test.NLog4" value =" ${path.build}/${build.platform}/tests/NLog4" />
114+ <property name =" product.assembly.silverlighttest.NLog4" value =" ${product.name}.NLog4.SilverlightTests.xap" />
115+ <mkdir dir =" ${current.path.test}" />
116+
117+ <property name =" target" value =" ${current.path.test.NLog4}" />
118+ <call target =" CopyXUnit-SL-Target" />
119+ <call target =" CopyMoq-SL-Target" />
120+ <call target =" CopyFluentAssertions-SL-Target" />
121+ <copy todir =" ${current.path.test.NLog4}" flatten =" true" >
122+ <fileset basedir =" ${current.path.build}" >
123+ <include name =" *.dll" />
124+ <include name =" lib/*.dll" />
125+ </fileset >
126+ </copy >
127+ <copy todir =" ${current.path.test.NLog4}" flatten =" true" >
128+ <fileset basedir =" ${current.path.test}" >
129+ <include name =" *.dll" />
130+ </fileset >
131+ </copy >
132+ <copy todir =" ${current.path.test.NLog4}" flatten =" true" >
133+ <fileset basedir =" ${current.path.build}/NLog4" >
134+ <include name =" **/*.dll" />
135+ </fileset >
136+ </copy >
137+
138+ <csc noconfig =" true" warnaserror =" true" target =" library" debug =" ${build.debug}" optimize =" ${build.optimize}" define =" ${build.defines}"
139+ output =" ${current.path.test.NLog4}/${product.name}.NLog4.SilverlightTests.dll" >
140+ <sources basedir =" ${path.src}" >
141+ <include name =" ${product.name}.Tests/**/*.cs" />
142+ <include name =" ${product.name}.NLog4.Test/**/*.cs" />
143+ <include name =" ${product.name}.NLog4.SilverlightTests/*.cs" />
144+ <include name =" ${product.name}.NLog4.SilverlightTests/Properties/*.cs" />
145+ <exclude name =" ${product.name}.Tests/MSTestAttributes/*.cs" />
146+ <exclude name =" ${product.name}.Tests/Properties/*.cs" />
147+ <exclude name =" ${product.name}.NLog4.Test/Properties/*.cs" />
148+ </sources >
149+ <references basedir =" ${current.path.test.NLog4}" >
150+ <include name =" mscorlib.dll" />
151+ <include name =" System.dll" />
152+ <include name =" System.Core.dll" />
153+ <include name =" System.Windows.dll" />
154+ <include name =" System.Windows.Browser.dll" />
155+ <include name =" System.Net.dll" />
156+ <include name =" Microsoft.Phone.dll" if =" ${string::contains(build.platform, 'wp7')}" />
157+ <include name =" Microsoft.Phone.Interop.dll" if =" ${string::contains(build.platform, 'wp7')}" />
158+ <include name =" Moq.Silverlight.dll" unless =" ${string::contains(build.platform, 'wp7')}" />
159+ <include name =" Castle.Core.dll" if =" ${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}" />
160+ <include name =" Castle.Core-Silverlight.dll" unless =" ${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}" />
161+ <include name =" Castle.DynamicProxy-Silverlight.dll" unless =" ${build.platform == 'silverlight-4.0' or build.platform == 'silverlight-5.0'}" />
162+ <include name =" xunit.runner.silverlight.dll" />
163+ <include name =" xunit-silverlight.dll" />
164+ <include name =" FluentAssertions.Silverlight.dll" />
165+ <include name =" ${current.path.lib.NLog4}/NLog.dll" />
166+ <include name =" ${product.assembly}" />
167+ <include name =" ${product.assembly.NLog4}" />
168+ <include name =" ${current.path.test}/${product.assembly.test}" />
169+ <include name =" ${path.lib}/Ninject/${build.platform}/Ninject.dll" />
170+ </references >
171+ <nowarn >
172+ <warning number =" 1584" />
173+ </nowarn >
174+ </csc >
175+ <zip zipfile =" ${current.path.test.NLog4}/${product.assembly.silverlighttest.NLog4}" >
176+ <fileset basedir =" ${current.path.test.NLog4}" >
177+ <include name =" *.dll" />
178+ </fileset >
179+ <fileset basedir =" ${path.src}/${product.name}.NLog4.SilverlightTests" >
180+ <include name =" AppManifest.xaml" />
181+ </fileset >
182+ </zip >
183+ </target >
184+
185+ <target name =" silverlight-test-NLog4" depends =" compile-silverlight-tests-NLog4" unless =" ${skip.tests or skip.silverlightTests}" if =" ${string::contains(build.platform, 'silverlight') and not(string::contains(build.platform, 'silverlight-4.0-wp') or string::contains(build.platform, 'silverlight-3.0') or string::contains(build.platform, 'silverlight-2.0'))}" >
186+ <if test =" ${not(skip.silverlightWPTests) or not(string::contains(build.platform, 'wp'))}" >
187+ <property name =" cmdLine" value =' -x"${product.assembly.silverlighttest.NLog4}" --teamcity --debug' if =" ${teamcity}" />
188+ <property name =" cmdLine" value =' -x"${product.assembly.silverlighttest.NLog4}"' unless =" ${teamcity}" />
189+ <exec program =" ${path.tools.statlight}" workingdir =" ${current.path.test.NLog4}" commandline =" ${cmdLine}" failonerror =" true" unless =" ${string::contains(build.platform, 'wp')}" />
190+ <exec program =" ${path.tools.statlight}" workingdir =" ${current.path.test.NLog4}" commandline =" ${cmdLine} --UsePhoneEmulator" failonerror =" true" if =" ${string::contains(build.platform, 'wp')}" />
191+ </if >
192+ </target >
193+
194+ <target name =" nuget-nlog4" >
195+ <property name =" nuget.sourcedir" value =" ${path.base}/nuget-nlog4" />
196+ <property name =" nuget.basedir" value =" ${path.base}/build/nuget-nlog4" />
197+ <property name =" nuget.platforms" value =" net-3.5-client,net-4.0-client,net-4.5,silverlight-5.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,silverlight-4.0-wp7,silverlight-4.0-wp71" />
198+ <property name =" nuget.name" value =" ${product.name}.NLog4" />
199+ <property name =" nuget.releaseDirectory" value =" ${path.build}\${build.platform}\release\NLog4" dynamic =" true" />
200+ <property name =" nuget.dependencies" value =" Ninject.Extensions.Logging" />
201+ <property name =" nuget.additionalFiles" value =" -" />
202+ <property name =" nuget.packageName" value =" ${nuget.name}${product.packagePostfix}" />
203+ <property name =" nuget.symbol.basedir" value =" ${path.base}/build/nuget-nlog4_symbol" />
204+ <property name =" nuget.project" value =" ${path.src}/${product.name}.NLog4/${product.name}.NLog4.csproj" />
205+
206+ <property name =" nant.settings.currentframework" value =" net-4.0" />
207+ <msbuild project =" ${nuget.project}" />
208+ <call target =" nuget-run" />
209+ </target >
210+ </project >
0 commit comments