GitHub user chlowell opened a pull request:
https://github.com/apache/logging-log4net/pull/14
Add .NET Standard 2.0 build
This adds a netstandard2.0 build consumable on .NET Core 2.0, .NET
Framework 4.6.1+, Xamarin platforms, and the next version of UWP ([this
doc](https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support)
has a complete support matrix).
Compared to the netstandard1.3 build, it shares much more code with .NET
Framework builds. Some classes still aren't available:
- Everything using ASP.NET (would need rewriting for ASP.NET Core)
- Everything using remoting (EventLogAppender, RemoteLoggingServerPlugin,
RemotingAppender)
- WindowsSecurityContext (Windows user impersonation isn't in .NET
Standard 2.0)
A few classes are supported on Windows alone because they PInvoke Win32
DLLs. These throw PlatformNotSupportedException on non-Windows platforms:
- ColoredConsoleAppender
- NativeError
- NetSendAppender
Similarly, UserNamePatternConverter is included but will raise a
PlatformNotSupportedException when it tries to get the current WindowsIdentity
on a non-Windows platform. It catches and reports this exception.
I also include csproj files for developing with Visual Studio 2017. The new
log4net.csproj enables building assemblies for all .NET Framework and Core
platforms, and packing them with NuGet. It has some limitations outside of
Visual Studio 2017:
- The dotnet CLI can't build the project for .NET Framework 3.5 and below
due to a [known issue](https://github.com/Microsoft/msbuild/issues/1333)
- On non-Windows platforms, a [similar
issue](https://github.com/dotnet/sdk/issues/335) requires workarounds to enable
building `net*` assemblies with Mono
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chlowell/logging-log4net netstandard2-develop
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/logging-log4net/pull/14.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14
----
commit 62a10f7c6db261fcf5f0cbb2d3b1c82461d2eb7b
Author: Charles Lowell <[email protected]>
Date: 2017-06-22T01:00:15Z
add preprocessor directives
commit 4dadc4e3a00c55e277b229769c653c6e582f804a
Author: Charles Lowell <[email protected]>
Date: 2017-06-22T03:29:05Z
update AssemblyInfo
commit f8d560e991b42bdc13cef416d3d6dd3dcef4f839
Author: Charles Lowell <[email protected]>
Date: 2017-08-15T20:06:27Z
NETSTANDARD1_3 -> NETCOREAPP1_0
commit 1dedf8703fcba7bce0777c94c9176a64d44a92a2
Author: Charles Lowell <[email protected]>
Date: 2017-06-22T03:35:39Z
replace prior sln and csproj files with vs2017 netstandard/core2.0
equivalents
commit 3b90468f647d8ee7853c6acd9bbbf01e61f1ec39
Author: Charles Lowell <[email protected]>
Date: 2017-08-09T20:19:09Z
delete .xprojes
commit 883fa674c284e09956c1fe9e92c4f71502a4fb18
Author: Charles Lowell <[email protected]>
Date: 2017-08-09T22:12:24Z
.gitignore src/log4net.xml
commit b17cdf0f1a8852c15d6c740739f2ee40f026cd15
Author: Charles Lowell <[email protected]>
Date: 2017-08-14T21:13:42Z
replace nant with dotnet cli in build-netstandard stage
commit 0fcbc268685c641263386651f76265c20a7a78df
Author: Charles Lowell <[email protected]>
Date: 2017-08-15T22:18:25Z
throw PlatformNotSupportedException where Windows DLLs are pinvoked
commit 4f8ce10f5883970da433951de6d1f7f1aafd8932
Author: Charles Lowell <[email protected]>
Date: 2017-08-15T23:03:44Z
update compile-netstandard nant target
commit b30a7098c915041d52a9d206d697dafb0c611f4b
Author: Charles Lowell <[email protected]>
Date: 2017-08-16T16:44:52Z
handle PlatformNotSupportedExceptions in UserNamePatternConverter
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---