Hi,
I have created a cross platform application with shared code lib option. I have the same app implemented using Xamarin.forms. I have a strange problem with the packages. I have included the same set of packages for Xamarin.Forms app and the cross platform with shared code app. However the below lib is not available in the later.(app with shared code)
using System.Net.Http.Headers;
Can some one tell me why.
Thanks for your time.
I assume the shared code is in a portable class library. Try adding the NuGet package HttpClient to the app and library
Hi Sravani,
I've created a new single view solution with shared projects option and then added the Microsoft HTTP Client Library to iOS and Android project. Now in the shared code I'm able to see the System.Net.Http.Headers namespace so is working fine.
Try to check your packages.
Fabio
Answers
I assume the shared code is in a portable class library. Try adding the NuGet package HttpClient to the app and library
https://www.nuget.org/packages/Microsoft.Net.Http
For PCL libs, the above lib is working fine, however if i create a shared code app(Shared Code, not PCL), the 'headers' module is not available in the Microsoft.Net.Http
Hi Sravani,
I've created a new single view solution with shared projects option and then added the Microsoft HTTP Client Library to iOS and Android project. Now in the shared code I'm able to see the System.Net.Http.Headers namespace so is working fine.
Try to check your packages.
Fabio
Fabio, Thank you for the confirmation. Yes they are available.