Xamarin SignalR Android System.Net.Http.Extensions.dll - c#

This is my first attempt at a Xamarin Android project. I have created a SignalR server in a console application and this is working fine. I am trying to create a Xamarin Android project in Visual Studio that can use SignalR to connect to my server. I have used nuget to add
Microsoft.AspNet.SignalR.Client
and
Newtonsoft.Json
When I try to build the project I am getting tthis error.
Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assemblySystem.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Perhaps it doesn't exist in the Mono for Android profile?
I can't find anything on Nuget called
System.Net.Http.Extensions.dll

I have tried this and it works with VisualStudio 2015
I downloaded the complete package from Xamarin account which is just one step to create.
And then go to the signalR package for Xamarin, and download the complete package.
the go for the following path
yourdownlodfolder\signalr-2.1.2.2\signalr-2.1.2.2\lib\android
you will find something like
Include it in your bin folder. and than add refenrences manually .
and you are done. Now follow the steps mentioned in the above link to create HubProxy

I'm facing the same problem.
After install the SignalR Client on my Xamarin Forms PCL application, the Android app breaks on build.
I opened a issue on the github. Posted a simple repo app.
The SignalR is the major functionality, so I'm pretty much stuck.
https://github.com/SignalR/SignalR/issues/3775

In my case, to solve the problem i installed the nuget Microsoft.Net.Http and rebuild de project.

Related

Error when installing 'Microsoft.AspNet.WebApi.Client' package onto Xamarin project

I am trying to install the 'Microsoft.AspNet.WebApi.Client' nuget package onto a Xamarin android project. This is going to be used to connect to a database and use an API to manipulate the data. This is the package I am trying to install
This is the error I am receiving. I am aware you can change it so your app targets a new version of android, but this doesn't say what version it needs to run on. Has anyone got a solution? Or any alternatives to connecting to a database without using SQLite
Thanks,

Xamarin Connectivity plugin always throws NotImplementedException

I am trying to use Xam.Plugin.Connectivity 2.3.0 by James Montemagno in my Cross platform Xamarin app. The package is installed in all the three projects i.e. protable, android and iOS. But whenever i try to check connectivity, it throws NotImplementedException. This behaviour is independent of whether i try to access it in the portable or platform specific project. This is the code with which i try to access it
if (CrossConnectivity.Current.IsConnected)
{
//business logic
}
The exception details are as follows
System.NotImplementedException: This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.
I have read similar posts on various forums, but none helped.
I have this
version installed and it works for me. download and install same version and try again. Hope that helps.
I got the same problem. Finally I found out that I only added the Xam.Plugin.Connectivity in PCL but I didn't add the package in the Android folder too. You add the package in Android folder again and it should works.

Xamarin Evolve - Errors on compilation

I just downloaded the XamarinEvolve project from GitHub and when trying to compile it on Microsoft Visual Studio Professional 2015 I got lot of errors as you can see on the following image:
Lot of these errors are related with the Google Cloud Messaging (GCM).
As you can see on the image above I downloaded the DLL from:
https://components.xamarin.com/view/googleplayservices-gcm
and added it to the project. But I think I'm still doing something wrong.
Any idea on how to fix this?
I have installed the project and build it on my machine. I have two issues with the project.
The first one is that need to have Android API 24. So, install it from Android SDK Manager.
The second one regarding the GCM. Please delete the GCM from your project using Package Manager Console using Uninstall-Package Xamarin.GooglePlayServices.Gcm. Then try reinstalling it using Install-Package Xamarin.GooglePlayServices.Gcm -Version 29.0.0.2
Clean, And Build.

Azure Mobile Services nuget won't install in new VS 2015 project

I am trying to create an Azure Mobile Services cross platform app. I am using Xamarin.Forms, so have been trying to follow this tutorial. However, I am not getting very far... I create a new Xamarin Forms project in Visual Studio 2015 and opening the nuget manager. I try to install Azure Mobile Services into each project in the solution. But I get the following set of errors:
Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'Azure_Test, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? Azure_Test.Droid
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.
I have filed a bugzilla case, but it seems like a pretty straight forward thing, so I wondered if there is anything I have done wrong there is a workaround?
Had this the other day. Before you install the Mobile Services package install the Microsoft.Bcl.Build nuget package. After that, I was able to install flawlessly.

Xamarin Studio cross platform app error

At the moment I'm trying to launch empty app with cross-platform solution in Xamarin Studio.
I've tried make app with empty library project and shared library, both has same errors. Now unresolved problems are:
1) Build error:
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file classes.jar doesn't exist. (XA5207) (*projectName*)
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file libs/internal_impl-21.0.3.jar doesn't exist. (XA5207) (*projectName*)
This question didn't help me.
2) Some links says it could be because of old Mono.Android.Support.v4 component. My component version is 21.0.3.0. After clicking for update it says:
You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework.
My Mono.Android assembly version is 0.0.0.0 and I dodn't know how to update it.
I've tried PCL project with PCL 4.5 - profile7. New projects builds normal, but after first project clean it gives me error about not found classes.jar file like described above. Another new PCL project still builds fine.
UPDATE
Error in PCL project occures not after clean - it occures with included Xamarin.Forms NuGet to Android project.
UPDATE
After rising target framework of android project to v4.0.3 I successfuly updated Mono.Android.Support.v4 component, but it still show me error about Please install package.
UPDATE
I'm using Windows 7 OS, same problem with all users including new user. But on another computer with Windows 8 it works. It is not a solution for me, but it can somehow help someone.
i think your java JDK and JRE not install properly and your path not set in your environment variable you must add your jdk path in that and if you are make application using cross platform then also add path SDK in your computer environmental variable. using CMD throw creating project.

Categories