How do I reference the latter Microsoft.Buildin the GAC using .fsx?
When I do #r "Microsoft.Build", I always get the version 4.0.0, but I want to download 12.0.0.

#r "Microsoft.Build"
open Microsoft.Build.Evaluation
printfn "%s" typeof<ProjectCollection>.Assembly.Location
This will help me solve this problem .
EDIT # 1:
Performing the full assembly name did not help me:

EDIT No. 2:
I need the latter, which may differ for different systems. I was hoping this would work. :(
#I @"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build\v4.0_14.0.0.0__b03f5f7f11d50a3a"
#I @"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build\v4.0_12.0.0.0__b03f5f7f11d50a3a"
#r "Microsoft.Build"
open Microsoft.Build.Evaluation
printfn "%s" typeof<ProjectCollection>.Assembly.Location

The good news is that it is now open source, and since none of this works the way I want, I am creating a plug now. I will probably rename it SourceLink.MSBuildto avoid conflict.
source
share