Search code examples
c#xamarinmonomonodevelop

Cannot update Microsoft.Extensions.Logging to (2.0) Mono Develop 6.1.4


My packages in my project indicated there was a version update to 2.0 for:

  • Microsoft.Extensions.Logging
  • NETStandard.Library
  • Microsoft.NETCore.Platforms

The only one I cannot get to update is Microsoft.Extensions.Logging

The Error I get is this:

Package 'Microsoft.Extensions.Logging 2.0.0' does not exist in folder '/home/MyUser/UpdatedPon/pon/sbmanager/packages' Could not install package 'Microsoft.Extensions.Logging 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I have been searching the internet the past few days looking for a solution, but I have not found one as of yet.

Has any one ran into this issue, I am running MonoDevelop 6.1.4 and my MONO version is 5.2.0.215.

Lastly this is a WebForms application.


Solution

  • The Microsoft.Extensions.Logging 2.0.0 NuGet packages has assemblies for .NET Standard 2.0.

    A more recent version of NuGet is required for .NET Standard 2.0 to be recognised as a target framework. So you would need to use MonoDevelop 7.1 for this to work. Also your project would need to target .NET 4.6.1 to be able to install the NuGet package.

    Alternatively you could try installing the older version Microsoft.Extensions.Logging 1.1.2 which contains .NET Standard 1.1 assemblies which should be recognised by MonoDevelop 6.1.