@@ -134,13 +134,18 @@ module internal MSBuildResolver =
134134 [<Literal>]
135135 let private Net451 = " v4.5.1"
136136
137- /// The list of supported .NET Framework version numbers, using the monikers of the Reference Assemblies folder.
138- let SupportedNetFrameworkVersions = set [ Net20; Net30; Net35; Net40; Net45; Net451; (* SL only*) " v5.0" ]
137+ //[<Literal>]
138+ //let private Net452 = "v4.5.2" // not available in Dev15 MSBuild version
139+
140+ [<Literal>]
141+ let private Net46 = " v4.6"
142+
143+ [<Literal>]
144+ let private Net461 = " v4.6.1"
139145
140146 /// Get the path to the .NET Framework implementation assemblies by using ToolLocationHelper.GetPathToDotNetFramework.
141147 /// This is only used to specify the "last resort" path for assembly resolution.
142148 let GetPathToDotNetFrameworkImlpementationAssemblies ( v ) =
143- #if FX_ ATLEAST_ 45
144149 let v =
145150 match v with
146151 | Net11 -> Some TargetDotNetFrameworkVersion.Version11
@@ -150,50 +155,44 @@ module internal MSBuildResolver =
150155 | Net40 -> Some TargetDotNetFrameworkVersion.Version40
151156 | Net45 -> Some TargetDotNetFrameworkVersion.Version45
152157 | Net451 -> Some TargetDotNetFrameworkVersion.Version451
158+ //| Net452 -> Some TargetDotNetFrameworkVersion.Version452 // not available in Dev15 MSBuild version
159+ | Net46 -> Some TargetDotNetFrameworkVersion.Version46
160+ | Net461 -> Some TargetDotNetFrameworkVersion.Version461
153161 | _ -> assert false ; None
154162 match v with
155163 | Some v ->
156164 match ToolLocationHelper.GetPathToDotNetFramework v with
157165 | null -> []
158166 | x -> [ x]
159167 | _ -> []
160- #else
161- // FX_ATLEAST_45 is not defined for step when we build compiler with proto compiler.
162- ignore v
163- []
164- #endif
165168
166169 let GetPathToDotNetFrameworkReferenceAssembliesFor40Plus ( version ) =
167- #if FX_ ATLEAST_ 45
168170 // starting with .Net 4.0, the runtime dirs (WindowsFramework) are never used by MSBuild RAR
169171 let v =
170172 match version with
171173 | Net40 -> Some TargetDotNetFrameworkVersion.Version40
172174 | Net45 -> Some TargetDotNetFrameworkVersion.Version45
173175 | Net451 -> Some TargetDotNetFrameworkVersion.Version451
176+ //| Net452 -> Some TargetDotNetFrameworkVersion.Version452 // not available in Dev15 MSBuild version
177+ | Net46 -> Some TargetDotNetFrameworkVersion.Version46
178+ | Net461 -> Some TargetDotNetFrameworkVersion.Version461
174179 | _ -> assert false ; None // unknown version - some parts in the code are not synced
175180 match v with
176181 | Some v ->
177182 match ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies v with
178183 | null -> []
179184 | x -> [ x]
180185 | None -> []
181- #else
182- // FX_ATLEAST_45 is not defined for step when we build compiler with proto compiler.
183- ignore version
184- []
185- #endif
186186
187187 /// Use MSBuild to determine the version of the highest installed framework.
188188 let HighestInstalledNetFrameworkVersionMajorMinor () =
189- #if FX_ ATLEAST_ 45
190- if box ( ToolLocationHelper.GetPathToDotNetFramework( TargetDotNetFrameworkVersion.Version451)) <> null then 4 , Net451
189+ if box ( ToolLocationHelper.GetPathToDotNetFramework( TargetDotNetFrameworkVersion.Version461)) <> null then 4 , Net461
190+ elif box ( ToolLocationHelper.GetPathToDotNetFramework( TargetDotNetFrameworkVersion.Version46)) <> null then 4 , Net46
191+ // 4.5.2 enumeration is not available in Dev15 MSBuild version
192+ //elif box (ToolLocationHelper.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version452)) <> null then 4, Net452
193+ elif box ( ToolLocationHelper.GetPathToDotNetFramework( TargetDotNetFrameworkVersion.Version451)) <> null then 4 , Net451
191194 elif box ( ToolLocationHelper.GetPathToDotNetFramework( TargetDotNetFrameworkVersion.Version45)) <> null then 4 , Net45
192195 else 4 , Net40 // version is 4.0 assumed since this code is running.
193- #else
194- // FX_ATLEAST_45 is not defined is required for step when we build compiler with proto compiler and this branch should not be hit
195- 4 , Net40
196- #endif
197196
198197 /// Derive the target framework directories.
199198 let DeriveTargetFrameworkDirectories ( targetFrameworkVersion : string , logMessage ) =
0 commit comments