Skip to content

Commit 93e2619

Browse files
committed
integrate master
1 parent 1fe7435 commit 93e2619

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/fsharp/ReferenceResolver.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ type Resolver =
3434
/// a .NET Framework version to use for scripts.
3535
abstract HighestInstalledNetFrameworkVersion : unit -> string
3636

37+
/// Get the Reference Assemblies directory for the .NET Framework (on Windows)
38+
/// This is added to the default resolution path for
39+
/// design-time compilations.
40+
abstract DotNetFrameworkReferenceAssembliesRootDirectory : string
41+
3742
/// Perform assembly resolution on the given references under the given conditions
3843
abstract Resolve :
3944
resolutionEnvironment: ResolutionEnvironment *
@@ -47,5 +52,5 @@ type Resolver =
4752
explicitIncludeDirs:string list *
4853
implicitIncludeDir:string *
4954
logMessage:(string->unit) *
50-
logErrorOrWarning:(bool -> string -> string -> unit)
55+
logErrorOrWarning:((*isError*)bool -> string -> string -> unit)
5156
-> ResolvedFile[]

src/fsharp/SimulatedMSBuildReferenceResolver.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let internal SimulatedMSBuildResolver =
3232
#endif
3333

3434
member __.Resolve(resolutionEnvironment, references, targetFrameworkVersion, targetFrameworkDirectories, targetProcessorArchitecture,
35-
outputDirectory, fsharpCoreDir, explicitIncludeDirs, implicitIncludeDir, logMessage, logWarning, logError) =
35+
fsharpCoreDir, explicitIncludeDirs, implicitIncludeDir, logMessage, logWarningOrError) =
3636

3737
#if !RESHAPED_MSBUILD
3838
let registrySearchPaths() =
@@ -88,7 +88,7 @@ let internal SimulatedMSBuildResolver =
8888
if not found && Path.IsPathRooted(r) then
8989
if FileSystem.SafeExists(r) then
9090
success r
91-
with e -> logWarning "SR001" (e.ToString())
91+
with e -> logWarningOrError false "SR001" (e.ToString())
9292

9393
#if !RESHAPED_MSBUILD
9494
// For this one we need to get the version search exactly right, without doing a load
@@ -104,7 +104,7 @@ let internal SimulatedMSBuildResolver =
104104
let trialPath = Path.Combine(fscoreDir0,n.Name + ".dll")
105105
if FileSystem.SafeExists(trialPath) then
106106
success trialPath
107-
with e -> logWarning "SR001" (e.ToString())
107+
with e -> logWarningOrError false "SR001" (e.ToString())
108108
#endif
109109

110110
let isFileName =
@@ -119,7 +119,7 @@ let internal SimulatedMSBuildResolver =
119119
let trialPath = Path.Combine(searchPath,qual)
120120
if FileSystem.SafeExists(trialPath) then
121121
success trialPath
122-
with e -> logWarning "SR001" (e.ToString())
122+
with e -> logWarningOrError false "SR001" (e.ToString())
123123

124124
#if !RESHAPED_MSBUILD
125125
try
@@ -160,7 +160,7 @@ let internal SimulatedMSBuildResolver =
160160
//printfn "searching GAC: %s" trialPath
161161
if FileSystem.SafeExists(trialPath) then
162162
success trialPath
163-
with e -> logWarning "SR001" (e.ToString())
163+
with e -> logWarningOrError false "SR001" (e.ToString())
164164
#endif
165165

166166
results.ToArray() }

0 commit comments

Comments
 (0)