0

I have mobile center set to build from my git repo of my app but for some reason the build process does not recognize the using statement

 using System.Net.Http;

and for that reason it fails. is there something I'm not doing exactly?

Brandon Minnick
  • 13,342
  • 15
  • 65
  • 123
John
  • 410
  • 1
  • 4
  • 19

2 Answers2

0

Visual studio can automatically resolve some dll's. Check the references and make sure that you have added System.Net.Http reference. If it is a PCL, make sure you add the Nuget.

Clancey
  • 333
  • 1
  • 6
  • So you're saying I should add the System.Net Nuget to my PCL project? ? – John Jun 01 '17 at 23:01
  • System.Net.Http does not exist in the default PCL profile. If your PCL project is the one that has "using System.Net.Http;" yes. If it is in another project type, ensure you have the reference for System.Net.Http and everything will start working. – Clancey Jun 01 '17 at 23:13
  • this is the error I get when I add the nuget Severity Code Description Project File Line Suppression State Error Could not install package 'System.Net.Http 4.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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. 0 – John Jun 02 '17 at 05:58
0

Okay to solve this issue all I had to do was add as a Nuget Microsoft.Net.Http to my PCL project and it was able to build in mobile center without affecting my Visual Studio Project.

John
  • 410
  • 1
  • 4
  • 19