Skip to content

Commit

Permalink
reference System.Runtime in scripts to allow ExtensionAttribute to be…
Browse files Browse the repository at this point in the history
… resolved when referencing PCL assemblies

fixes #381
closes #382
  • Loading branch information
latkin committed Apr 24, 2015
1 parent 98104be commit 54712ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fsharp/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,9 +1575,12 @@ let DefaultBasicReferencesForOutOfProjectSources =
// Note: this is not a partiuclarly good technique as it relying on the environment the compiler is executing in
// to determine the default references. However, System.Core will only fail to load on machines with only .NET 2.0,
// in which case the compiler will also be running as a .NET 2.0 process.
//
// NOTE: it seems this can now be removed now that .NET 4.x is minimally assumed when using this toolchain
if (try System.Reflection.Assembly.Load "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" |> ignore; true with _ -> false) then
yield "System.Core"

yield "System.Runtime"
yield "System.Web"
yield "System.Web.Services"
yield "System.Windows.Forms" ]
Expand All @@ -1604,6 +1607,7 @@ let SystemAssemblies primaryAssemblyName =
yield "System.Web.Services"
yield "System.Windows.Forms"
yield "System.Core"
yield "System.Runtime"
yield "System.Observable"
yield "System.Numerics"]

Expand Down

0 comments on commit 54712ec

Please sign in to comment.