-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .NET Standard 2.0 build #14
Changes from 10 commits
62a10f7
4dadc4e
f8d560e
1dedf87
3b90468
883fa67
b17cdf0
0fcbc26
4f8ce10
b30a709
878aa0d
3fa4763
20cb82c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to you under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
(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 | ||
|
@@ -1748,48 +1748,64 @@ limitations under the License. | |
</csc> | ||
</if> | ||
</target> | ||
<!-- these targets build lognet assemblies against .NET Core (.net standard 1.0.4)--> | ||
<target name="compile-netstandard" description="Builds .NET Core"> | ||
<!-- these targets build lognet assemblies against .NET Standard 1.3 and 2.0 --> | ||
<target name="compile-netstandard" description="Builds .NET Standard"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer this to become the target |
||
<call target="set-debug-build-configuration"/> | ||
<call target="compile-netstandard-current-configuration"/> | ||
<call target="set-release-build-configuration"/> | ||
<call target="compile-netstandard-current-configuration"/> | ||
</target> | ||
<target name="compile-netstandard-current-configuration"> | ||
<echo message="dotnet --version"/> | ||
<exec program="dotnet" workingdir="netstandard" failonerror="false" resultproperty="dotnet.available"> | ||
<exec program="dotnet" workingdir="${log4net.basedir}" failonerror="false" resultproperty="dotnet.available"> | ||
<arg value="--version"/> | ||
</exec> | ||
<if test="${dotnet.available != '0'}"> | ||
<echo message="Skipping build; required framework is not available: netstandard"/> | ||
</if> | ||
<if test="${dotnet.available == '0'}"> | ||
<echo message="dotnet restore log4net.netstandard.sln"/> | ||
<exec program="dotnet" workingdir="netstandard"> | ||
<arg value="restore"/> | ||
<arg value="log4net.netstandard.sln"/> | ||
</exec> | ||
<if test="${current.build.config.release != '-c'}"> | ||
<echo message="dotnet build log4net"/> | ||
<echo message="dotnet build log4net.csproj"/> | ||
</if> | ||
<if test="${current.build.config.release == '-c'}"> | ||
<echo message="dotnet build log4net -c Release"/> | ||
<echo message="dotnet build log4net.csproj -c Release"/> | ||
</if> | ||
<exec program="dotnet" workingdir="netstandard"> | ||
<exec program="dotnet" workingdir="${log4net.basedir}/src"> | ||
<arg value="build"/> | ||
<arg value="log4net"/> | ||
<arg value="log4net.csproj"/> | ||
<arg value="-f"/> | ||
<arg value="netstandard1.3"/> | ||
<arg if="${current.build.config.release}" value="-c"/> | ||
<arg if="${current.build.config.release}" value="Release"/> | ||
</exec> | ||
<mkdir dir="${log4net.basedir}/bin/netstandard/1.3"/> | ||
<if test="${current.build.config.release}"> | ||
<move todir="${log4net.basedir}/bin/netstandard/1.3/release"> | ||
<fileset basedir="netstandard/log4net/bin/Release/netstandard1.3"/> | ||
<fileset basedir="${log4net.basedir}/src/bin/Release/netstandard1.3"/> | ||
</move> | ||
</if> | ||
<ifnot test="${current.build.config.release}"> | ||
<move todir="${log4net.basedir}/bin/netstandard/1.3/debug"> | ||
<fileset basedir="netstandard/log4net/bin/Debug/netstandard1.3"/> | ||
<fileset basedir="${log4net.basedir}/src/bin/Debug/netstandard1.3"/> | ||
</move> | ||
</ifnot> | ||
<exec program="dotnet" workingdir="${log4net.basedir}/src"> | ||
<arg value="build"/> | ||
<arg value="log4net.csproj"/> | ||
<arg value="-f"/> | ||
<arg value="netstandard2.0"/> | ||
<arg if="${current.build.config.release}" value="-c"/> | ||
<arg if="${current.build.config.release}" value="Release"/> | ||
</exec> | ||
<mkdir dir="${log4net.basedir}/bin/netstandard/2.0"/> | ||
<if test="${current.build.config.release}"> | ||
<move todir="${log4net.basedir}/bin/netstandard/2.0/release"> | ||
<fileset basedir="${log4net.basedir}/src/bin/Release/netstandard2.0"/> | ||
</move> | ||
</if> | ||
<ifnot test="${current.build.config.release}"> | ||
<move todir="${log4net.basedir}/bin/netstandard/2.0/debug"> | ||
<fileset basedir="${log4net.basedir}/src/bin/Debug/netstandard2.0"/> | ||
</move> | ||
</ifnot> | ||
</if> | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,7 +321,7 @@ public void DoAppend(LoggingEvent loggingEvent) | |
{ | ||
ErrorHandler.Error("Failed in DoAppend", ex); | ||
} | ||
#if !MONO && !NET_2_0 && !NETSTANDARD1_3 | ||
#if !(MONO || NET_2_0 || NETSTANDARD1_3 || NETSTANDARD2_0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see a naming scheme difference here. According to the conventions so far, a underscore has been there before the version of a target. Thus There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used the FrameworkMajor_Minor convention because it's used by the build system, e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then this is fine by me. |
||
// on .NET 2.0 (and higher) and Mono (all profiles), | ||
// exceptions that do not derive from System.Exception will be | ||
// wrapped in a RuntimeWrappedException by the runtime, and as | ||
|
@@ -428,7 +428,7 @@ public void DoAppend(LoggingEvent[] loggingEvents) | |
{ | ||
ErrorHandler.Error("Failed in Bulk DoAppend", ex); | ||
} | ||
#if !MONO && !NET_2_0 && !NETSTANDARD1_3 | ||
#if !(MONO || NET_2_0 || NETSTANDARD1_3 || NETSTANDARD2_0) | ||
// on .NET 2.0 (and higher) and Mono (all profiles), | ||
// exceptions that do not derive from System.Exception will be | ||
// wrapped in a RuntimeWrappedException by the runtime, and as | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer this to be a separate stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just now realized why you had to change this. The docker microsoft/dotnet is now on debian stretch which does no longer include nant (https://packages.debian.org/search?suite=all§ion=all&arch=any&searchon=names&keywords=nant). We probably should move away from nant entirely.