android - Visual Studio, Android: Find out, which Framework is neccessary for Nuget-packages
问题描述
I am in bit of a tumble here. I am wanting to move away from admob. I read the Facebook Ads SDK is just "as" good, if not better.
So, for that I am working with Visual Studio, I need to download the SDK via the Nuget-console. But as soon as I am trying install the Facebook SDK Version 6.0.10. it gives me the error that (translated from german):
"The package "Facebook 6.0.10" could not be installed. You are trying to install this package into a project, that references "MonoAndroid, Version = v8.0". The Package however does not include any assembly reference or data that would be compatable with this framework."
I am however able to install the Facebook Version JUST before that (5.4.1) but I need the newer one.
What's also weired is the fact, that I am running the newest and second newest frameworks and tried both but nothing from the 6+ range of Facebook SDKs will install.
However, my question: How can I find out, which framework is neccissary in order to install any nuget package? I cannot download and try them all, that would be insane - there must be a better way, right?
Thanks!
解决方案
How can I find out, which framework is necessary in order to install any nuget package? I cannot download and try them all, that would be insane - there must be a better way, right?
To find out which framework is necessary when installing any nuget package, The only way I know is to look inside the NuGet package itself.
I use the NuGet Package Explorer to see the framework it supports, you can get it from Microsoft store.
For example, I downloaded the package Facebook 6.0.10 from nuget.org manually and open it with nuget package explorer:
Then we could to know the package Facebook 6.0.10 supports:
- net35-client (.NETFramework,Version=v3.5,Profile=Client)
- net40-client (.NETFramework,Version=v4.0,Profile=Client)
- net45 (.NETFramework,Version=v4.5)
- sl4-wp71 (Silverlight,Version=v4.0,Profile=WindowsPhone71)
- sl5 (Silverlight,Version=v5.0)
- winrt (WinRT,Version=v0.0)
That is the reason why you got the error "The package "Facebook 6.0.10" could not be installed. You are trying to install this package into a project, that references "MonoAndroid, Version = v8.0", MonoAndroid, Version = v8.0 is not in the support list for the package Facebook 6.0.10
.
Hope this helps.
推荐阅读
- c# - 有没有办法将组合框中的选定项目转换为代码?
- php - 有没有办法在 laravel 的数据库查询生成器中检索数据库表中的单行列
- c++ - 在堆或堆栈上分配的动态创建的字符串 - C
- android-studio - 如何使用另一个 Activity 的 onBackPressed() 方法从 Activity 清除/重置 SharedPreference?
- javascript - 当新图像加载到 beer-reveal 时,Beerslider.js 停止正常工作
- react-native - React 本机 apk 生成失败
- javascript - 基于另一个数组的嵌套过滤器数组
- go - go不支持运算符重载,但是time包怎么解释
- c++ - 如果将鼠标事件设置为透明,您如何仍然使用小部件的功能?
- python - Python 正则表达式:删除短行