MiDaa
MiDaa

Reputation: 1324

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

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?

Upvotes: 2

Views: 1303

Answers (2)

Sathish
Sathish

Reputation: 360

@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

Upvotes: 2

NightOwl888
NightOwl888

Reputation: 56909

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.

Upvotes: 3

Related Questions