Home Failed to install log4net from NuGet in a .NET Standard library project
Reply: 2

Failed to install log4net from NuGet in a .NET Standard library project

MiDaa
1#
MiDaa Published in 2018-02-14 10:41:31Z

I just started on this project and it is basically empty. When I try to install log4net in nuget package manager, the following error is shown in the output.

A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs

I simply do not understand this message, why it tells me there's a .net core thing in my project?

When it says this package is implicitly referenced, does it mean that I have loaded this package? However, I don't quite believe that since I could not use anything from log4net.

BTW, the same error happens when I try to install an old version of netsoft json.

I created the project as a .NET Standard 1.1 project.

Am I misconfiguring something or I have a totally wrong idea about the whole thing?

NightOwl888
2#
NightOwl888 Reply to 2018-02-15 05:06:54Z

I created the project as a .net standard 1.1 project

According to the Documentation, log4net only supports .NET Standard 1.3 or higher. You will either have to target .NET Standard 1.3+ or find a logging library that has support for .NET Standard 1.1.

The lower the .NET Standard version that you target, the fewer APIs are available, and the less likely it will be that 3rd party libraries can target it.

Sathish
3#
Sathish Reply to 2018-02-20 16:11:42Z

@NightOwl888, I have looked into the issue tracker of log4net and found log4net is not available for .net standard 2.0. Please refer : https://issues.apache.org/jira/browse/LOG4NET-572

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.385235 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO