From b02965711a387b015a6af4b9d26bbdabf10fc5b4 Mon Sep 17 00:00:00 2001
From: Mikayla Hutchinson <m.j.hutchinson@gmail.com>
Date: Mon, 1 Aug 2016 13:47:41 -0400
Subject: [PATCH 1/2] Remove xbuild workarounds

They do not work Mono 4.6+ where the underlying bug is fixed
---
 src/FSharpSource.targets | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets
index eb57269..ea3656f 100755
--- a/src/FSharpSource.targets
+++ b/src/FSharpSource.targets
@@ -306,8 +306,6 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
     <DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE</DefineConstants>
     <DefineConstants>$(DefineConstants);QUERIES_IN_FSLIB</DefineConstants>

-    <!-- An explicit search path seems to be needed on Mono 3.4.0 otherwise the reference assemblies for the profile aren't found -->
-    <AssemblySearchPaths Condition="Exists('$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.0\mscorlib.dll')">$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.0</AssemblySearchPaths>
   </PropertyGroup>

   <!-- Target Portable -->
@@ -348,8 +346,6 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
     <TargetProfile>netcore</TargetProfile>
     <TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <!-- An explicit search path seems to be needed on Mono 3.4.0 otherwise the reference assemblies for the profile aren't found -->
-    <AssemblySearchPaths Condition="Exists('$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5\System.Runtime.dll')">$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5</AssemblySearchPaths>
     <OtherFlags>$(OtherFlags) --targetprofile:netcore</OtherFlags>
   </PropertyGroup>

@@ -389,8 +385,6 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
     <TargetProfile>netcore</TargetProfile>
     <TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <!-- An explicit search path seems to be needed on Mono 3.4.0 otherwise the reference assemblies for the profile aren't found -->
-    <AssemblySearchPaths Condition="Exists('$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5\System.Runtime.dll')">$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5</AssemblySearchPaths>
     <OtherFlags>$(OtherFlags) --targetprofile:netcore</OtherFlags>
   </PropertyGroup>

@@ -430,8 +424,6 @@ Some other NuGET monikers to support in the future, see http://docs.nuget.org/do
     <TargetProfile>netcore</TargetProfile>
     <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <!-- An explicit search path seems to be needed on Mono 3.4.0 otherwise the reference assemblies for the profile aren't found -->
-    <AssemblySearchPaths Condition="Exists('$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5\System.Runtime.dll')">$(MSBuildExtensionsPath32)\..\xbuild-frameworks\.NETPortable\v4.5</AssemblySearchPaths>
     <OtherFlags>$(OtherFlags) --targetprofile:netcore</OtherFlags>
   </PropertyGroup>

--
2.7.4 (Apple Git-66)


From e57cb16ee7927bb31b2c9b63e1b2e394bf9f9932 Mon Sep 17 00:00:00 2001
From: Mikayla Hutchinson <m.j.hutchinson@gmail.com>
Date: Mon, 1 Aug 2016 13:48:23 -0400
Subject: [PATCH 2/2] Remove dead code

Remove Mono workarounds for missing files. Mono has been
shipping the files for some time now.
---
 .../FSharp.Build/Microsoft.Portable.FSharp.Targets | 52 ----------------------
 1 file changed, 52 deletions(-)

diff --git a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets
index 8c99ab6..ee5f9b1 100644
--- a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets
+++ b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets
@@ -24,60 +24,8 @@ Copyright (C) Microsoft Corporation. All rights reserved.
                 Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\v4.0\Microsoft.Portable.Common.targets') AND
                            !Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.props')"/>

-
-    <!-- Try to do it ourselves - Explicitly include contents of Microsoft.Portable.Core.props + Microsoft.FSharp.Targets + Microsoft.Portable.Core.targets -->
-    <!-- START MONO 3.2.7 WORKAROUND PART 1 -->
-        <PropertyGroup
-                Condition="(!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\v4.0\Microsoft.Portable.Common.targets')) AND
-                           (!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.props'))">
-		<AvailablePlatforms>Any CPU</AvailablePlatforms>
-
-		<TargetPlatformIdentifier>Portable</TargetPlatformIdentifier>
-		<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
-		<TargetFrameworkMonikerDisplayName>.NET Portable Subset</TargetFrameworkMonikerDisplayName>
-
-		<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-		<NoStdLib>true</NoStdLib>
-
-		<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework>
-	</PropertyGroup>
-        <!-- END MONO 3.2.7 WORKAROUND PART 1 -->
-
-
	<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" />

-
-    <!-- START MONO 3.2.7 WORKAROUND PART 2 -->
-	<PropertyGroup
-                Condition="(!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\v4.0\Microsoft.Portable.Common.targets')) AND
-                           (!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.props'))" >
-		<ResolveReferencesDependsOn>
-			$(ResolveReferencesDependsOn);
-			ImplicitlyExpandTargetFramework;
-		</ResolveReferencesDependsOn>
-
-		<ImplicitlyExpandTargetFrameworkDependsOn>
-			$(ImplicitlyExpandTargetFrameworkDependsOn);
-			GetReferenceAssemblyPaths
-		</ImplicitlyExpandTargetFrameworkDependsOn>
-	</PropertyGroup>
-
-	<Target Name="ImplicitlyExpandTargetFramework"
-		DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)"
-                Condition="(!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\v4.0\Microsoft.Portable.Common.targets')) AND
-                           (!Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.props'))" >
-
-		<ItemGroup>
-			<ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/>
-			<ReferencePath Include="%(ReferenceAssemblyPaths.Identity)\*.dll">
-				<CopyLocal>false</CopyLocal>
-				<ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom>
-				<IsSystemReference>True</IsSystemReference>
-			</ReferencePath>
-		</ItemGroup>
-	</Target>
-        <!-- END MONO 3.2.7 WORKAROUND PART 2 -->
-
	<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.targets"
                 Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\Portable\Microsoft.Portable.Core.props')"/>

--
2.7.4 (Apple Git-66)
