I'm building a console project using Xamarin 6.1.1 on Mac OS X 10.11.6.
I've attached a screenshot of my current installed packages. I've tried adding both System.Data.Common 4.0.0 and 4.1.0 all end up with the same error.
ERROR:
"Could not install package 'System.Data.Common 4.1.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."
Any idea on how to resolve this issue?
the nuget page for System.Data.Common lists the supported frameworks - for .NET you need to be sure your project targets 4.5.1
Related
I have a Xamarin project using .NET Standard 2.0 and i'm trying to authenticate an user via facebook. For that i'm trying to install Xamarin.Auth.
I keep getting these errors:
Severity Code Description Project File Line Suppression State
Error NU1202 Package Microsoft.Owin 4.0.0 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1).
Package Microsoft.Owin 4.0.0 supports: net451 (.NETFramework,Version=v4.5.1)
App.Android C:\gitwork\App\App\App.Android\App.Android.csproj 1
Severity Code Description Project File Line Suppression State
Error NU1202 Package Owin 1.0.0 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1).
Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
App.Android C:\gitwork\App\App\App.Android\App.Android.csproj 1
I googled as much as i could and couldn't find an answer how to solve this.
Anyone had this issue and found a workaround?
Thanks in advance.
Although i replied this as a comment, since this resolved your issue,
i'm posting it as an answer as well so you can mark it and help others that
might miss the comment
Install the package on your PCL project instead of your Android project
I use MvvmCross and I have installed plugins via nuget packages on xamarin studio on mac os...
Everything works well but sometimes when I add a plugin I got this error and can't build my app anymore:
Error MT2002: Failed to resolve "MvvmCross.Platform.Plugins.MvxLoaderPluginManager" reference from "MvvmCross.Platform, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" (MT2002) "
It could happens with any plugins...
The error concerns my iOS project. The pcl aren't touched by this issue.
Any idea on how to solve it ?
I ran across the exact same error when adding the PictureChooser plugin and resolved it by upgrading my MVVMCross packages to newer versions. Version 4.23 (and newer) of MVVMCross built successfully, but earlier versions would give me that same error. I hope this helps.
Maybe your plugin is referencing an older version of MvvmCross.Platform then your pcl/ios project?
I'm unable to add GCM to my Xamarin app. This is the output from the package console:
Adding Xamarin.GooglePlayServices.Gcm...
Attempting to resolve dependency 'Xamarin.GooglePlayServices.Base (= 29.0.0.1)'.
Attempting to resolve dependency 'Xamarin.GooglePlayServices.Basement (= 29.0.0.1)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v4 (≥ 23.1.1.1)'.
Attempting to resolve dependency 'Xamarin.GooglePlayServices.Measurement (= 29.0.0.1)'.
Updating 'Xamarin.Android.Support.v4 23.0.1.3' to 'Xamarin.Android.Support.v4 23.3.0' failed. Unable to find a version of 'Xamarin.Forms' that is compatible with 'Xamarin.Android.Support.v4 23.3.0'.
For this version you must install an earlier version of Xamarin.GooglePlayServices.Gcm. I had no problems with 27.0.0.
If you need the newest version, you could do this:
uninstall xamarin.forms nuget package
update all android packages to 23.3.0
install Xamarin.GooglePlayServices.Gcm
search for xamarin.forms and set in options ignore dependencies
install newest version
Of course you must be aware of problems, since this is not recommended with good reasons.
You need to Update your Xamarin.Forms package. Open Packages (Dropdown) in Solutions pane and Right-Click on Xamarin.Forms and click on Update
If you are using PCL, you can find this package in the PCL (Xamarin.Forms) project.
If you are using Shared Asset Project, you will find this package in both Xamarin.Android and Xamarin.iOS project.
You have to update Android SDK Platform-tools to revision 26.0.2 (or equivalent).
Open Android SDK Manager, check update, and select
"Update avaiable rev.26.0.2" and install it.
I am making a multi-platform app in VS 2013 (iOS, WinPhone and Android). I want to add into the iOS reference folder a Nuget Packages named Microsoft Http Clients Libraries and I cannot do it because I get the following error:
Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying
to install this package into a project that targets
'Xamarin.iOS,Version=v1.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.
Can anybody help me with that?
I faced the same problem and apparently the Bcl.Build 1.0.14 can not be installed, but you probably you don't need that old version.
I faced this issue when I tried adding WindowsAzure.MobileService to the iOS Xamarin project. And it failed, because the minimal supported Bcl.Build is required to be 1.0.14, but if you have a newer version, which installs quite fine, you will be able to add other packages that depend on it.
So
1. Install Microsoft.Bcl.Build package separately (the latest)
2. Install your package that depends on it.
Go to -> Solution -> Manage Packages For Solution -> In the tab "Browse" -> Select the two options follow below:
First:
Install package "Microsoft.Bcl.Build" your version more latest 1.0.21
Second:
After this step, now install package "Microsoft.Net.Http" your version mor latest 2.2.29
Result:
For me was solved!
Microsoft.Bcl.Build 1.0.14 can be installed into Xamarin.iOS projects.
It may fail if:
Your NuGet Package manager is not up to date.
You do not have the Xamarin Portable Class Library profiles for Xamarin.iOS installed.
If you have the latest Xamarin version installed it is probably the NuGet Package Manager not being up to date. You can update it from Tools - Extensions and Updates - Updates - Visual Studio Gallery.
In Visual Studio 2017 I encountered above error, and I solved the issue by installing Microsoft.Bcl.Build first on the Xamarin.Android, then installed Microsoft.Net.Http and System.Net.Http, but Xamarin.IOS and Xamarin.UWP there were no issues.
I found the solution and put it here in case some one may face the same problem.
Install "Microsoft.Bcl.Build.1.0.21" first for all your projects.
Now you can install "PortableRest", all dependency that depends on Microsoft.Bcl.Build will be installed correctly.
I was trying to install Microsoft.Net.Http in my Xamarin.Forms project when i faced this issue. Here is what you must try to get rid of this error:
1- Update Xamarin.Forms to latest version in each project of solution.
2- As my primary intention was to install Microsoft.Net.Http, and this package had dependencies on Microsoft.BCL and Microsoft.BCL.Build. I tried installing these packages (Microsoft.Bcl and Microsoft.Bcl.Build) individually and it worked for me. First install latest version of Microsoft.Bcl.Build 1.0.21 (If 1.0.14 did not install, try latest version). Then, install Microsoft.Bcl which should be installed successfully and this solution worked for me and I hope would work for you too. After installing these packages indivisually, I was able to install Microsoft.Net.Http successfully.
NOTE: While installing Packages (Microsoft.Bcl and Microsoft.Bcl.Build) into your projects, check which version you are installing. Try installing another version, if one does not work and let me know If problem does not solve.
Have a great day :)
Can anyone please let me know how to create xerces 3.1.1 xcode project on mac.
I have downloaded the xercese 3.1.1 source code from xerces site. The source code only include projects related to windows.
Thanks,
RCJ
I got the problem fixed.
Tallied source file to be included in Xcode project with the file already got compiled through make.
Removed unnecessary inclusion of c files from projects.
At the end project build successfully