@@ -236,5 +236,126 @@ let ``Project file parsing -- multi language project``() =
236
236
checkOption options.OtherOptions " ConsoleApplication2.exe"
237
237
checkOption options.OtherOptions " ConsoleApplication3.exe"
238
238
239
+ [<Test>]
240
+ let ``Project file parsing -- PCL profile7 project`` () =
241
+ let f = normalizePath (__ SOURCE_ DIRECTORY__ + @" ../../projects/Sample_VS2013_FSharp_Portable_Library_net45/Sample_VS2013_FSharp_Portable_Library_net45.fsproj" )
242
+
243
+ let options = checker.GetProjectOptionsFromProjectFile( f)
244
+ let references =
245
+ options.OtherOptions
246
+ |> Array.choose ( fun o -> if o.StartsWith( " -r:" ) then o.[ 3 ..] |> ( Path.GetFileName >> Some) else None)
247
+ |> Set.ofArray
248
+ references
249
+ |> shouldEqual
250
+ ( set [| " FSharp.Core.dll" ; " Microsoft.CSharp.dll" ; " Microsoft.VisualBasic.dll" ;
251
+ " System.Collections.Concurrent.dll" ; " System.Collections.dll" ;
252
+ " System.ComponentModel.Annotations.dll" ;
253
+ " System.ComponentModel.DataAnnotations.dll" ;
254
+ " System.ComponentModel.EventBasedAsync.dll" ; " System.ComponentModel.dll" ;
255
+ " System.Core.dll" ; " System.Diagnostics.Contracts.dll" ;
256
+ " System.Diagnostics.Debug.dll" ; " System.Diagnostics.Tools.dll" ;
257
+ " System.Diagnostics.Tracing.dll" ; " System.Dynamic.Runtime.dll" ;
258
+ " System.Globalization.dll" ; " System.IO.Compression.dll" ; " System.IO.dll" ;
259
+ " System.Linq.Expressions.dll" ; " System.Linq.Parallel.dll" ;
260
+ " System.Linq.Queryable.dll" ; " System.Linq.dll" ; " System.Net.Http.dll" ;
261
+ " System.Net.NetworkInformation.dll" ; " System.Net.Primitives.dll" ;
262
+ " System.Net.Requests.dll" ; " System.Net.dll" ; " System.Numerics.dll" ;
263
+ " System.ObjectModel.dll" ; " System.Reflection.Context.dll" ;
264
+ " System.Reflection.Extensions.dll" ; " System.Reflection.Primitives.dll" ;
265
+ " System.Reflection.dll" ; " System.Resources.ResourceManager.dll" ;
266
+ " System.Runtime.Extensions.dll" ;
267
+ " System.Runtime.InteropServices.WindowsRuntime.dll" ;
268
+ " System.Runtime.InteropServices.dll" ; " System.Runtime.Numerics.dll" ;
269
+ " System.Runtime.Serialization.Json.dll" ;
270
+ " System.Runtime.Serialization.Primitives.dll" ;
271
+ " System.Runtime.Serialization.Xml.dll" ; " System.Runtime.Serialization.dll" ;
272
+ " System.Runtime.dll" ; " System.Security.Principal.dll" ;
273
+ " System.ServiceModel.Duplex.dll" ; " System.ServiceModel.Http.dll" ;
274
+ " System.ServiceModel.NetTcp.dll" ; " System.ServiceModel.Primitives.dll" ;
275
+ " System.ServiceModel.Security.dll" ; " System.ServiceModel.Web.dll" ;
276
+ " System.ServiceModel.dll" ; " System.Text.Encoding.Extensions.dll" ;
277
+ " System.Text.Encoding.dll" ; " System.Text.RegularExpressions.dll" ;
278
+ " System.Threading.Tasks.Parallel.dll" ; " System.Threading.Tasks.dll" ;
279
+ " System.Threading.dll" ; " System.Windows.dll" ; " System.Xml.Linq.dll" ;
280
+ " System.Xml.ReaderWriter.dll" ; " System.Xml.Serialization.dll" ;
281
+ " System.Xml.XDocument.dll" ; " System.Xml.XmlSerializer.dll" ; " System.Xml.dll" ;
282
+ " System.dll" ; " mscorlib.dll" |])
283
+
284
+ checkOption options.OtherOptions " --targetprofile:netcore"
285
+
286
+ [<Test>]
287
+ let ``Project file parsing -- PCL profile78 project`` () =
288
+ let f = normalizePath (__ SOURCE_ DIRECTORY__ + @" ../../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj" )
289
+
290
+ let options = checker.GetProjectOptionsFromProjectFile( f)
291
+ let references =
292
+ options.OtherOptions
293
+ |> Array.choose ( fun o -> if o.StartsWith( " -r:" ) then o.[ 3 ..] |> ( Path.GetFileName >> Some) else None)
294
+ |> Set.ofArray
295
+ references
296
+ |> shouldEqual
297
+ ( set [| " FSharp.Core.dll" ; " Microsoft.CSharp.dll" ; " System.Collections.dll" ;
298
+ " System.ComponentModel.EventBasedAsync.dll" ; " System.ComponentModel.dll" ;
299
+ " System.Core.dll" ; " System.Diagnostics.Contracts.dll" ;
300
+ " System.Diagnostics.Debug.dll" ; " System.Diagnostics.Tools.dll" ;
301
+ " System.Dynamic.Runtime.dll" ; " System.Globalization.dll" ; " System.IO.dll" ;
302
+ " System.Linq.Expressions.dll" ; " System.Linq.Queryable.dll" ; " System.Linq.dll" ;
303
+ " System.Net.NetworkInformation.dll" ; " System.Net.Primitives.dll" ;
304
+ " System.Net.Requests.dll" ; " System.Net.dll" ; " System.ObjectModel.dll" ;
305
+ " System.Reflection.Extensions.dll" ; " System.Reflection.Primitives.dll" ;
306
+ " System.Reflection.dll" ; " System.Resources.ResourceManager.dll" ;
307
+ " System.Runtime.Extensions.dll" ;
308
+ " System.Runtime.InteropServices.WindowsRuntime.dll" ;
309
+ " System.Runtime.Serialization.Json.dll" ;
310
+ " System.Runtime.Serialization.Primitives.dll" ;
311
+ " System.Runtime.Serialization.Xml.dll" ; " System.Runtime.Serialization.dll" ;
312
+ " System.Runtime.dll" ; " System.Security.Principal.dll" ;
313
+ " System.ServiceModel.Http.dll" ; " System.ServiceModel.Primitives.dll" ;
314
+ " System.ServiceModel.Security.dll" ; " System.ServiceModel.Web.dll" ;
315
+ " System.ServiceModel.dll" ; " System.Text.Encoding.Extensions.dll" ;
316
+ " System.Text.Encoding.dll" ; " System.Text.RegularExpressions.dll" ;
317
+ " System.Threading.Tasks.dll" ; " System.Threading.dll" ; " System.Windows.dll" ;
318
+ " System.Xml.Linq.dll" ; " System.Xml.ReaderWriter.dll" ;
319
+ " System.Xml.Serialization.dll" ; " System.Xml.XDocument.dll" ;
320
+ " System.Xml.XmlSerializer.dll" ; " System.Xml.dll" ; " System.dll" ; " mscorlib.dll" |])
321
+
322
+ checkOption options.OtherOptions " --targetprofile:netcore"
323
+
324
+ [<Test>]
325
+ let ``Project file parsing -- PCL profile259 project`` () =
326
+ let f = normalizePath (__ SOURCE_ DIRECTORY__ + @" ../../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile259/Sample_VS2013_FSharp_Portable_Library_net451.fsproj" )
327
+
328
+ let options = checker.GetProjectOptionsFromProjectFile( f)
329
+ let references =
330
+ options.OtherOptions
331
+ |> Array.choose ( fun o -> if o.StartsWith( " -r:" ) then o.[ 3 ..] |> ( Path.GetFileName >> Some) else None)
332
+ |> Set.ofArray
333
+ references
334
+ |> shouldEqual
335
+ ( set [| " FSharp.Core.dll" ; " Microsoft.CSharp.dll" ; " System.Collections.dll" ;
336
+ " System.ComponentModel.EventBasedAsync.dll" ; " System.ComponentModel.dll" ;
337
+ " System.Core.dll" ; " System.Diagnostics.Contracts.dll" ;
338
+ " System.Diagnostics.Debug.dll" ; " System.Diagnostics.Tools.dll" ;
339
+ " System.Dynamic.Runtime.dll" ; " System.Globalization.dll" ; " System.IO.dll" ;
340
+ " System.Linq.Expressions.dll" ; " System.Linq.Queryable.dll" ; " System.Linq.dll" ;
341
+ " System.Net.NetworkInformation.dll" ; " System.Net.Primitives.dll" ;
342
+ " System.Net.Requests.dll" ; " System.Net.dll" ; " System.ObjectModel.dll" ;
343
+ " System.Reflection.Extensions.dll" ; " System.Reflection.Primitives.dll" ;
344
+ " System.Reflection.dll" ; " System.Resources.ResourceManager.dll" ;
345
+ " System.Runtime.Extensions.dll" ;
346
+ " System.Runtime.InteropServices.WindowsRuntime.dll" ;
347
+ " System.Runtime.Serialization.Json.dll" ;
348
+ " System.Runtime.Serialization.Primitives.dll" ;
349
+ " System.Runtime.Serialization.Xml.dll" ; " System.Runtime.Serialization.dll" ;
350
+ " System.Runtime.dll" ; " System.Security.Principal.dll" ;
351
+ " System.ServiceModel.Web.dll" ; " System.Text.Encoding.Extensions.dll" ;
352
+ " System.Text.Encoding.dll" ; " System.Text.RegularExpressions.dll" ;
353
+ " System.Threading.Tasks.dll" ; " System.Threading.dll" ; " System.Windows.dll" ;
354
+ " System.Xml.Linq.dll" ; " System.Xml.ReaderWriter.dll" ;
355
+ " System.Xml.Serialization.dll" ; " System.Xml.XDocument.dll" ;
356
+ " System.Xml.XmlSerializer.dll" ; " System.Xml.dll" ; " System.dll" ; " mscorlib.dll" |])
357
+
358
+ checkOption options.OtherOptions " --targetprofile:netcore"
359
+
239
360
#endif
240
361
0 commit comments