Could not install package 'Microsoft.Extensions.Logging 2.1.1' - visual-studio-2013

I'm trying to update Bing Ads SDK to version 12.13.5. I am using Visual Studio 2013. Nuget version is 2.12.0.817. When I try to update, I get the following error:
Could not install package 'Microsoft.Extensions.Logging 2.1.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', 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 tried installing Microsoft.Extensions.Logging 3.0.0 (latest version) and get the same error.
I also tried targeting .NET version 4.6.1 and 4.5.2 and got the same error.

For anyone else who may have this problem, the solution was to manually add a package entry
for Microsoft.Extensions.Logging 2.1.1 to packages.config. This allowed the Bing Ads SDK package to update successfully.

As indicated in the docs, your platform needs to be .NETStandard 2.0 or .Net Core 2.1.
The libraries that target .NETStandard2.0, means any .NET Core app that is compatible with the .NET Standard 2.0 can use them, regardless of the .NET SDK they are using.

Related

Upgrade to OneSignal 4.0 SDK not compatible with PCL Profile44 and others Visual Studio Mac 2022

when trying to install the OneSignal 4.x SDK to the shared project part of my pcs project I get the following error:
OneSignalSDK.Xamarin 4.1.0 with .NETPortable,Version=v4.5,Profile=Profile259.
Package OneSignalSDK.Xamarin 4.1.0 is not compatible with portable45-net45+win8+wp8+wpa81 (.NETPortable,Version=v4.5,Profile=Profile259). Package OneSignalSDK.Xamarin 4.1.0 supports:
monoandroid41 (MonoAndroid,Version=v4.1)
netstandard2.0 (.NETStandard,Version=v2.0)
xamarinios (Xamarin.iOS,Version=v0.0)
I tried almost every other Profile with the same result. I cant get this to install.
The SDK installs fine in the iOS and Android projects. And the former sdk 3.x also installed fine.
Any help on this would be great!
Thanks
Thomas

Does latest version of StackExcahnge.Redis is supported in .NetFramework 4.0?

I tried to add the StackExchange.Redis in my project file and got the below error
"Could not install package 'StackExchange.Redis 2.0.601'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', 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."
Does latest version of StackExcahnge.Redis is supported in .NetFramework 4.0?
No.
According to Nuget, the current version (v2.0.601) has a minimum requirement of .Net Framework 4.6.1

can't update or install any nuget packages in vs 2017

I just installed vs 2017 and wanted to run my project but i'm facing so many warning and errors so I realized I should update my xamarin.android nuget packages but I keep getting this error message below:
Severity Code Description Project File Line Suppression State Error Could not install package 'Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2-preview1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v8.0', 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. 0
Repairing vs didn't work; deleting nuget.config didn't work; I even changed the version in .csproj file, but when i load the project it goes back to v8.0.
Can anybody please help?
can't update or install any nuget packages in vs 2017
Just as Jon said, the latest nuget package Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2-preview1, which requires MonoAndroid81 at minimum to install.
However, only the latest Preview (15.6 Preview 2) version of Visual Studio includes Android 8.1 support. As this moment, current release version is 15.5.4, preview release version is 15.6 Preview 2. So if you want use that nuget package the latest version 27.0.2-preview1, you need download the latest version of Visual Studio 15.6 Preview 2 and install Android SDK 8.1.
If switch to Visual Studio 15.6 Preview 2 is not your choice, you should not update that package to the latest version, just use the version 26.1.0.1.
Hope this answer more clear.
This requires MonoAndroid81 at minimum to install. You can use the current Preview which includes Android 8.1 support:
https://blog.xamarin.com/xamarin-android-now-double-stuffed-with-oreo-8-1/
For future reference, the support library has a major version that maps with the Android version it supports. In this case Support v27 = Android 8.1 (API 27)
When errors appear, clean your solution and rebuild it.
Also do something very basic, that what you are going to download is "accessible " in .Droid and that is not only in the Portable.
If you do not serve, and do not find a solution, you must start a new project, it would be advisable to install the latest SDK, etc.

Microsoft.NETCore.UniversalWindowsPlatform different versions

I have an app, I have developer over some time, and today I was hoping for a release, but then it was complaining that I had to install Microsoft.NETCore.UniversalWindowsPlatform v 5.3.0, which I did, but then new errors occured.
If I am creating a new blank app, I can only find Microsoft.NETCore.UniversalWindowsPlatform v 5.2.0 in NuGet.
What can I have done wrong?
Microsoft.NETCore.UniversalWindowsPlatform 5.2.0 is released on June 27, 2016. However, according to NuGet. 
The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore. 
So it seems we still need to use 5.1.0 version by now. You can force to use 5.1.0 version by using following command.
Install-Package Microsoft.NETCore.UniversalWindowsPlatform -Version 5.1.0
This known issue was posted regarding .NET Core 5.2.0. To workaround this limitation, you can downgrade the version of .NET Core that your project is targeting by right clicking on your project in the solution explorer and selecting "Manage NuGet Packages..."
In the NuGet Package Manager UI, you should be able to browse through all of your NuGet packages. Locate Microsoft.NETCore.UniversalWindowsPlatform, and use the NuGet Package Manager UI to change the version to 5.1.0.

How to install 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3' on Xamarin PCL?

Following this tutorial I'm trying to install MvvmCross.HotTuna.MvvmCrossLibraries in Core project. The latest version of this library 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'.
After adding Nuget Package I have the following error:
Could not install package 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile14', 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.
Does anyone know what the problem is?
Answer to original question:
MvvmCross is not available for ASP.NET. You need to use it in one of the compatible frameworks like UWP, Xamarin.Android, Xamarin.iOS or a PCL.
Updated Question:
MvvmCross uses at least .NET 4.5 with profile 259. Switch to those to be able to install the libraries.

Resources