[system.net.http] Set version to 4.0.0.0 on MOBILE
authorJonathan Pryor <jonpryor@vt.edu>
Wed, 14 May 2014 17:02:10 +0000 (13:02 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Wed, 14 May 2014 17:02:10 +0000 (13:02 -0400)
For a variety of reasons, we need to bump the assembly version of
System.Net.Http.dll to "4.0.0.0" (from 2.0.5.0) on our MOBILE
profiles, lest much pain and suffering occur, e.g.:

http://motzcod.es/post/78863496592/portable-class-libraries-httpclient-so-happy

> For some reason at compile time the facades don’t kick in
> properly and it tries to use the NuGet version of
> System.Net.Http which has some specific functionality for
> older platforms. ...
> All you need to do is create a new app.config file in your
> Android and iOS project.

The need to create a custom app.config is ugly and something
to be avoided. Setting our System.Net.Http.dll version to
v4.0.0.0 removes the need for the custom app.config.

mcs/class/System.Net.Http/Assembly/AssemblyInfo.cs

index 8e2d0dfeff3a1fff94f8d6626e08e82d7df944f4..6aa0c9d0b8b28e9149b4c613a41069f9ddf1fc31 100644 (file)
@@ -44,10 +44,18 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
+
+#if MOBILE
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: SatelliteContractVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.50524.0")]
+[assembly: AssemblyFileVersion ("4.0.50524.0")]
+#else
 [assembly: AssemblyVersion (Consts.FxVersion)]
 [assembly: SatelliteContractVersion (Consts.FxVersion)]
 [assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
 [assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+#endif
 
 [assembly: NeutralResourcesLanguage ("en-US")]
 [assembly: CLSCompliant (true)]