[ 
https://issues.apache.org/jira/browse/LOG4NET-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435336#comment-16435336
 ] 

Dominik Psenner edited comment on LOG4NET-592 at 4/12/18 10:47 AM:
-------------------------------------------------------------------

I just uploaded a sample project that targets netcoreapp2.1 and it works for 
me. Here's what the project consists of in plaintext:

Program.cs:
{code}
using System;
using log4net;
using log4net.Config;
using log4net.Core;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var repository = LogManager.CreateRepository("root");
            BasicConfigurator.Configure(repository);
            var logger = repository.GetLogger(typeof(Program).Name);

            Console.WriteLine("Hello World!");

            logger.Log(new LoggingEvent(new LoggingEventData()
            {
                Level = Level.Info,
                Message = "Hello World!",
            }));

            Console.WriteLine("Press [Enter] to terminate ..");
            Console.ReadLine();
        }
    }
}
{code}
ConsoleApp.csproj:
{code:xml}
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>netcoreapp2.1</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="log4net" Version="2.0.8" />
    </ItemGroup>
</Project>
{code}

May I close this issue?


was (Author: nachbarslumpi):
I just uploaded a sample project that targets netcoreapp2.1 and it works for 
me. Here's what the project consists of in plaintext:

Program.cs:
{code}
using System;
using log4net;
using log4net.Config;
using log4net.Core;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var repository = LogManager.CreateRepository("root");
            BasicConfigurator.Configure(repository);
            var logger = repository.GetLogger(typeof(Program).Name);

            Console.WriteLine("Hello World!");

            logger.Log(new LoggingEvent(new LoggingEventData()
            {
                Level = Level.Info,
                Message = "Hello World!",
            }));

            Console.WriteLine("Press [Enter] to terminate ..");
            Console.ReadLine();
        }
    }
}
{code}
ConsoleApp.csproj:
{code:xml}
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.8" />
</ItemGroup>

</Project>
{code}

May I close this issue?

> log4net 2.0.8 does not support .netcore 2.1
> -------------------------------------------
>
>                 Key: LOG4NET-592
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-592
>             Project: Log4net
>          Issue Type: New Feature
>         Environment: Windows 7
> VSCode
> .netcore 2.1
> .NET Command Line Tools (2.1.300-preview1-008174)
>            Reporter: Sathish
>            Priority: Major
>         Attachments: netcore-2.1.tar
>
>
> log4net package doesn't support .netcore2.1 ( 2.1.0-preview1-final)
>  
> Error while installing log4net 2.0.8 package:
>  error NU1100: Unable to resolve 'log4net (>= 2.0.8)' for 
> '.NETCoreApp,Version=v2.1'.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to