System.Net.Http.Primitives - Moments Project

Hello Everyone,

I've downloaded the Moments project as I presume there would be some usable code and it would be a good example for using the camera and selecting pictures. The objective is to apply some of the techniques used in Moments to our own projects. As with many projects one might download there are typically a couple or so errors that arise when building. I've worked through most of those but I'm down to two critical errors that I have not been able to resolve in a reasonable amount of time.

Here are the two critical messages...

**1) Error Failed to resolve assembly: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Moments.iOS

2) Error NuGet Package restore failed for project Moments.Analysis: Unable to find version '4.0.11' of package 'System.Net.Http.Primitives'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'System.Net.Http.Primitives.4.0.11' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'.
https://www.nuget.org/api/v2/: Package 'System.Net.Http.Primitives.4.0.11' is not found on source 'https://www.nuget.org/api/v2/'.
https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/: Package 'System.Net.Http.Primitives.4.0.11' is not found on source 'https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/'.
**
I’ve tried many of the “Answers” on Stackoverflow without resolve. And I’ve looked high and low in other forums as well.

The environment in use has been proven stable as I've successfully debugged code in Visual Studio while simultaneously running the iOS simulator on a Mac. Have also debugged from a device connected to the Mac.

Below is a list of installed products and version. This was obtained in VS by clicking Help > About Visual Studio.

Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual Basic 2015 00322-20000-00000-AA864
Microsoft Visual Basic 2015

Visual C# 2015 00322-20000-00000-AA864
Microsoft Visual C# 2015

Visual C++ 2015 00322-20000-00000-AA864
Microsoft Visual C++ 2015

Visual F# 2015 00322-20000-00000-AA864
Microsoft Visual F# 2015

Application Insights Tools for Visual Studio Package 7.11.01104.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Clang with Microsoft CodeGen 14.0.25516
Clang with Microsoft CodeGen

Command Bus, Event Stream and Async Manager Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PHP Tools for Visual Studio 1.20.9101.2015
PHP Tools extend Visual Studio with a set of features to build PHP applications more efficiently. It makes code more readable, easier to navigate, and clean.

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio 2.2.40825.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration 2.2.40825.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support 2.2.40825.00
Profiling support for Python projects.

SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript 1.8.36.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps 14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.2.0.719 (15694b9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.0.1.6 (5a02b03)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS 10.2.0.4 (b638977)
Visual Studio extension to enable development for Xamarin.iOS.

Posts

  • JWhiteJWhite USMember, Xamarin Team Xamurai

    Hi @BobMcLelland

    Are you using the XAML or C# project? What changes were made? I was able to get the project to build and deploy by just updating the Xamarin.Forms and Newtonsoft nugets to latest, as well as retarget the builds to the latest API versions. So for iOS I make sure I am building for iOS 10 and Android N. I was not able to recreate the issue you are seeing.

    You may want to consider a fresh download from the GitHub and applying the steps above. With the XAML app you will get a compile error after updating Xamarin.Forms as you have to add local:BasePage references to the XAML pages inheriting from BasePage, as well as xmlns:local definitions for some that are missing it.

    Otherwise, this appears to compile and deploy fine. As a note, you will need to remove Xamarin.Insights and either update it to use HockeyApp or remove Insights references completely.

  • Photon76Photon76 FRMember ✭✭

    Hello,

    I have the same issue : Error Failed to resolve assembly: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

    My project is a Xamarin.iOS not a .Forms one.
    IDE : Xamarin Studio for Mac

    It was working well, until I installed AWSSDK packages and the error happened.

    I manually added the package System.Net.Http (4.3.0) and added reference too System.Net.Http (Version Assembly 4.0.0.0) but the error is still here....

  • RenanPupinRenanPupin USMember

    Got the same mistake... someone find the solution?

  • MathMoMathMo USMember ✭✭

    Same issue

  • RayQuRayQu NZMember

    @HOTONPhilippe
    Hi, have you got any solution? I have the same issue that after using AWS I wasn't able to build the project.

    @HOTONPhilippe said:
    Hello,

    I have the same issue : Error Failed to resolve assembly: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

    My project is a Xamarin.iOS not a .Forms one.
    IDE : Xamarin Studio for Mac

    It was working well, until I installed AWSSDK packages and the error happened.

    I manually added the package System.Net.Http (4.3.0) and added reference too System.Net.Http (Version Assembly 4.0.0.0) but the error is still here....

  • RayQuRayQu NZMember

    @HOTONPhilippe @RenanPupin @MathMo

    Found a work around. I think It has to be a Bug. Hope could help you guys and other people.

    Have to do it in RIGHT ORDER
    1. Delete all the packages in screenshot in the attachment.
    2. Search Microsoft.BCL.Build in Package and install.
    3. Search Microsoft.Net.Http in Package and install.
    4. Search AWS if you need it and install.
    5. Make sure in project setting, e.g. double click iOS folder, -> iOS Build ->Link Behaviour ->Link Framework SDKs Only

    These have to be done for every projects you need (PCL,iOS,Android etc)

  • Photon76Photon76 FRMember ✭✭

    @RayQu said:
    @HOTONPhilippe @RenanPupin @MathMo

    Found a work around. I think It has to be a Bug. Hope could help you guys and other people.

    Have to do it in RIGHT ORDER
    1. Delete all the packages in screenshot in the attachment.
    2. Search Microsoft.BCL.Build in Package and install.
    3. Search Microsoft.Net.Http in Package and install.
    4. Search AWS if you need it and install.
    5. Make sure in project setting, e.g. double click iOS folder, -> iOS Build ->Link Behaviour ->Link Framework SDKs Only

    These have to be done for every projects you need (PCL,iOS,Android etc)

    Yep, I did that too. But I didn't check the point 5. ...
    It seems that the installation of the AWS package didn't manage its dependencies in my configuration...
    Any way Thank you @RayQu !

  • IsraelFonsecaIsraelFonseca USMember

    Also worked for me. Thanks @RayQu! I was having this same problem with the AWS S3 package.

Sign In or Register to comment.