Skip to content

Commit 26f948f

Browse files
committed
Merge pull request #26 from estiller/master
Add NLog3 Support to the Logging Extensions
2 parents ee6edfc + 9219d2c commit 26f948f

38 files changed

+67453
-12
lines changed

Ninject.Extensions.Logging with Silverlight and WP7 Unittesting.sln

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
3333
ReleaseNotes.md = ReleaseNotes.md
3434
EndProjectSection
3535
EndProject
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Logging.NLog3", "src\Ninject.Extensions.Logging.NLog3\Ninject.Extensions.Logging.NLog3.csproj", "{C502867B-7748-469A-9C83-A3760DF79D6D}"
37+
EndProject
38+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Logging.NLog3.Test", "src\Ninject.Extensions.Logging.NLog3.Test\Ninject.Extensions.Logging.NLog3.Test.csproj", "{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}"
39+
EndProject
40+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Logging.NLog3.SilverlightTests", "src\Ninject.Extensions.Logging.NLog3.SilverlightTests\Ninject.Extensions.Logging.NLog3.SilverlightTests.csproj", "{CEA0DC71-86F5-4520-8369-A9FDF62E7863}"
41+
EndProject
3642
Global
3743
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3844
Debug|Any CPU = Debug|Any CPU
@@ -167,6 +173,36 @@ Global
167173
{1900695D-E89C-419E-ADB5-AD88E98B74E7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
168174
{1900695D-E89C-419E-ADB5-AD88E98B74E7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
169175
{1900695D-E89C-419E-ADB5-AD88E98B74E7}.Release|x86.ActiveCfg = Release|Any CPU
176+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
177+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
178+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
179+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
180+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Debug|x86.ActiveCfg = Debug|Any CPU
181+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
182+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Release|Any CPU.Build.0 = Release|Any CPU
183+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
184+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
185+
{C502867B-7748-469A-9C83-A3760DF79D6D}.Release|x86.ActiveCfg = Release|Any CPU
186+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
187+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Debug|Any CPU.Build.0 = Debug|Any CPU
188+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
189+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
190+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Debug|x86.ActiveCfg = Debug|Any CPU
191+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Release|Any CPU.ActiveCfg = Release|Any CPU
192+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Release|Any CPU.Build.0 = Release|Any CPU
193+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
194+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Release|Mixed Platforms.Build.0 = Release|Any CPU
195+
{BB1808C2-83ED-4F37-9A4E-D6B6D671FA91}.Release|x86.ActiveCfg = Release|Any CPU
196+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
197+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Debug|Any CPU.Build.0 = Debug|Any CPU
198+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
199+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
200+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Debug|x86.ActiveCfg = Debug|Any CPU
201+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Release|Any CPU.ActiveCfg = Release|Any CPU
202+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Release|Any CPU.Build.0 = Release|Any CPU
203+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
204+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Release|Mixed Platforms.Build.0 = Release|Any CPU
205+
{CEA0DC71-86F5-4520-8369-A9FDF62E7863}.Release|x86.ActiveCfg = Release|Any CPU
170206
EndGlobalSection
171207
GlobalSection(SolutionProperties) = preSolution
172208
HideSolutionNode = FALSE

Ninject.Extensions.Logging.NLog2.build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<property name="product.platforms" value="silverlight-4.0-wp71,silverlight-4.0-wp7" overwrite="false"/>
77

88
<target name="buildNLog2">
9-
<property name="packagepath.NLog2" value="nlog.*/lib/${nuget.platform}" unless="${string::contains(build.platform, 'mono')}" />
10-
<property name="packagepath.NLog2" value="nlog.*/lib/net35" if="${string::contains(build.platform, 'mono')}" />
11-
<property name="packagepath.NLog2" value="nlog.*/lib/net40" if="${build.platform == 'net-4.0'}" />
12-
<property name="packagepath.NLog2" value="nlog.*/lib/net45" if="${string::contains(build.platform, 'net-4.5')}" />
9+
<property name="packagepath.NLog2" value="nlog.2.*/lib/${nuget.platform}" unless="${string::contains(build.platform, 'mono')}" />
10+
<property name="packagepath.NLog2" value="nlog.2.*/lib/net35" if="${string::contains(build.platform, 'mono')}" />
11+
<property name="packagepath.NLog2" value="nlog.2.*/lib/net40" if="${build.platform == 'net-4.0'}" />
12+
<property name="packagepath.NLog2" value="nlog.2.*/lib/net45" if="${string::contains(build.platform, 'net-4.5')}" />
1313

1414
<property name="current.path.lib.NLog2" value="${path.packages}/${packagepath.NLog2}" />
1515

@@ -52,7 +52,7 @@
5252
<call target="CopyFluentAssertions-Target"/>
5353
<copy todir="${current.path.test.NLog2}" flatten="true">
5454
<fileset basedir="${current.path.test}">
55-
<include name="**/*.dll"/>
55+
<include name="*.dll"/>
5656
</fileset>
5757
</copy>
5858
<copy todir="${current.path.test.NLog2}" flatten="true">
@@ -128,7 +128,7 @@
128128
</copy>
129129
<copy todir="${current.path.test.NLog2}" flatten="true">
130130
<fileset basedir="${current.path.test}">
131-
<include name="**/*.dll"/>
131+
<include name="*.dll"/>
132132
</fileset>
133133
</copy>
134134
<copy todir="${current.path.test.NLog2}" flatten="true">
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<project name="Ninject.NLog3" default="all">
3+
<property name="product.assembly.NLog3" value="${product.name}.NLog3.dll" overwrite="false"/>
4+
<property name="product.assembly.test.NLog3" value="${product.name}.NLog3.Test.dll" overwrite="false"/>
5+
6+
<target name="buildNLog3" 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.NLog3" value="nlog.3.*/lib/${nuget.platform}" unless="${string::contains(build.platform, 'mono')}" />
8+
<property name="packagepath.NLog3" value="nlog.3.*/lib/net35" if="${string::contains(build.platform, 'mono')}" />
9+
<property name="packagepath.NLog2" value="nlog.3.*/lib/net40" if="${build.platform == 'net-4.0'}" />
10+
<property name="packagepath.NLog3" value="nlog.3.*/lib/net45" if="${string::contains(build.platform, 'net-4.5')}" />
11+
12+
<property name="current.path.lib.NLog3" value="${path.packages}/${packagepath.NLog3}" />
13+
14+
<copy todir="${current.path.build}/NLog3/lib">
15+
<fileset basedir="${path.packages}">
16+
<include name="${packagepath.NLog3}/*.dll"/>
17+
<include name="${packagepath.NLog3}/*.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}/NLog3/${product.assembly.NLog3}"
23+
doc="${current.path.build}/NLog3/${product.name}.NLog3.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}.NLog3/**/*.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.NLog3}/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-NLog3-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.NLog3" value="${path.build}/${build.platform}/tests/NLog3"/>
45+
<mkdir dir="${current.path.test.NLog3}"/>
46+
47+
<property name="target" value="${current.path.test.NLog3}" />
48+
<call target="CopyXUnit-Target"/>
49+
<call target="CopyMoq-Target"/>
50+
<call target="CopyFluentAssertions-Target"/>
51+
<copy todir="${current.path.test.NLog3}" flatten="true">
52+
<fileset basedir="${current.path.test}">
53+
<include name="*.dll"/>
54+
</fileset>
55+
</copy>
56+
<copy todir="${current.path.test.NLog3}" flatten="true">
57+
<fileset basedir="${current.path.build}/NLog3">
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.NLog3}/${product.assembly.test.NLog3}">
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}.NLog3.Test/**/*.cs"/>
68+
</sources>
69+
<references basedir="${current.path.test.NLog3}">
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.NLog3}/NLog.dll"/>
77+
<include name="${product.assembly}"/>
78+
<include name="${product.assembly.NLog3}"/>
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="testNLog3" depends="compile-NLog3-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.NLog3}"
92+
failonerror="true"
93+
if="${not(string::contains(build.platform, 'mono')) or teamcity}">
94+
<arg value="${product.assembly.test.NLog3}" />
95+
<arg value="/html" />
96+
<arg path="${current.path.test.NLog3}/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.NLog3}"
103+
failonerror="true">
104+
<arg value="${path.tools.xunit.console}" />
105+
<arg value="${product.assembly.test.NLog3}" />
106+
<arg value="/html" />
107+
<arg path="${current.path.test.NLog3}/results.html" />
108+
</exec>
109+
</if>
110+
</target>
111+
112+
<target name="compile-silverlight-tests-NLog3" 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.NLog3" value="${path.build}/${build.platform}/tests/NLog3"/>
114+
<property name="product.assembly.silverlighttest.NLog3" value="${product.name}.NLog3.SilverlightTests.xap"/>
115+
<mkdir dir="${current.path.test}"/>
116+
117+
<property name="target" value="${current.path.test.NLog3}" />
118+
<call target="CopyXUnit-SL-Target"/>
119+
<call target="CopyMoq-SL-Target"/>
120+
<call target="CopyFluentAssertions-SL-Target"/>
121+
<copy todir="${current.path.test.NLog3}" 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.NLog3}" flatten="true">
128+
<fileset basedir="${current.path.test}">
129+
<include name="*.dll"/>
130+
</fileset>
131+
</copy>
132+
<copy todir="${current.path.test.NLog3}" flatten="true">
133+
<fileset basedir="${current.path.build}/NLog3">
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.NLog3}/${product.name}.NLog3.SilverlightTests.dll">
140+
<sources basedir="${path.src}">
141+
<include name="${product.name}.Tests/**/*.cs"/>
142+
<include name="${product.name}.NLog3.Test/**/*.cs"/>
143+
<include name="${product.name}.NLog3.SilverlightTests/*.cs"/>
144+
<include name="${product.name}.NLog3.SilverlightTests/Properties/*.cs"/>
145+
<exclude name="${product.name}.Tests/MSTestAttributes/*.cs"/>
146+
<exclude name="${product.name}.Tests/Properties/*.cs"/>
147+
<exclude name="${product.name}.NLog3.Test/Properties/*.cs"/>
148+
</sources>
149+
<references basedir="${current.path.test.NLog3}">
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.NLog3}/NLog.dll"/>
166+
<include name="${product.assembly}"/>
167+
<include name="${product.assembly.NLog3}"/>
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.NLog3}/${product.assembly.silverlighttest.NLog3}">
176+
<fileset basedir="${current.path.test.NLog3}">
177+
<include name="*.dll" />
178+
</fileset>
179+
<fileset basedir="${path.src}/${product.name}.NLog3.SilverlightTests">
180+
<include name="AppManifest.xaml"/>
181+
</fileset>
182+
</zip>
183+
</target>
184+
185+
<target name="silverlight-test-NLog3" depends="compile-silverlight-tests-NLog3" 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.NLog3}" --teamcity --debug' if="${teamcity}"/>
188+
<property name="cmdLine" value='-x"${product.assembly.silverlighttest.NLog3}"' unless="${teamcity}"/>
189+
<exec program="${path.tools.statlight}" workingdir="${current.path.test.NLog3}" commandline="${cmdLine}" failonerror="true" unless="${string::contains(build.platform, 'wp')}" />
190+
<exec program="${path.tools.statlight}" workingdir="${current.path.test.NLog3}" commandline="${cmdLine} --UsePhoneEmulator" failonerror="true" if="${string::contains(build.platform, 'wp')}" />
191+
</if>
192+
</target>
193+
194+
<target name="nuget-nlog3">
195+
<property name="nuget.sourcedir" value="${path.base}/nuget-nlog3" />
196+
<property name="nuget.basedir" value="${path.base}/build/nuget-nlog3" />
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}.nlog3" />
199+
<property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release\nlog3" 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-nlog3_symbol" />
204+
<property name="nuget.project" value="${path.src}/${product.name}.NLog3/${product.name}.NLog3.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>

Ninject.Extensions.Logging.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<include buildfile="Ninject.include" />
1313
<include buildfile="Ninject.Extensions.Logging.log4net.build" />
1414
<include buildfile="Ninject.Extensions.Logging.NLog2.build" />
15+
<include buildfile="Ninject.Extensions.Logging.NLog3.build" />
1516
<include buildfile="Ninject.Extensions.Logging.Serilog.build" />
16-
17-
<target name="all" depends="core buildLog4Net buildNLog2 buildSerilog testLog4Net testNLog2 testSerilog silverlight-test-NLog2"/>
18-
<target name="nuget-all" depends="nuget nuget-log4net nuget-nlog2 nuget-Serilog"/>
17+
<target name="all" depends="core buildLog4Net buildNLog2 buildNLog3 buildSerilog testLog4Net testNLog2 testNLog3 testSerilog silverlight-test-NLog2 silverlight-test-NLog3"/>
18+
<target name="nuget-all" depends="nuget nuget-log4net nuget-nlog2 nuget-nlog3 nuget-Serilog"/>
1919

2020
<target name="core" depends="init">
2121
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}" output="${current.path.build}/${product.assembly}" doc="${current.path.build}/${product.docfile}" keyfile="${path.src}/${product.keyfile}">

0 commit comments

Comments
 (0)