From 5e29efd1f1378c4f6911d0c6fb91aaaeef2b0a8d Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Sun, 20 Aug 2017 14:58:48 +0200 Subject: [PATCH] Fix KnownTargetProfiles-list and wpa parsing - Add net50 to project files (+update baselines) - Add test to ensure KnownTargetProfiles-lists are updated - Fix wpa parsing: Was parsed as wpa80 but that one doesn't exist (at least not in NuGet). wpa81 is the correct one. - Add hack for uap10.1 to keep project files constant for '.NetCore' (I don't know the correct condition to generate anyway) --- .../Paket.IntegrationTests.fsproj | 28 ++--- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../ConsoleApplication1.fsprojtemplate | 20 ++-- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary/MyClassLibrary.expected | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary/MyClassLibrary.expected | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../ConsoleApplication1.vcxprojtemplate | 2 +- .../MyClassLibrary.csproj.expected | 6 +- .../MyClassLibrary.csprojtemplate | 4 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary/MyClassLibrary.expected | 2 +- .../TestPaketDotNet.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 2 +- .../MyClassLibrary.csprojtemplate | 74 ++++++------ src/Paket.Core/Paket.Core.fsproj | 20 ++-- .../Versioning/FrameworkHandling.fs | 112 ++++++++++-------- src/Paket/Paket.fsproj | 18 +-- .../Paket.Bootstrapper.Tests.csproj | 30 ++--- .../InstallModel/Xml/ControlzEx.fs | 6 +- .../InstallModel/Xml/FSharp.Data.SqlClient.fs | 2 +- .../InstallModel/Xml/LibGit2Sharp.fs | 4 +- tests/Paket.Tests/InstallModel/Xml/Plossum.fs | 2 +- tests/Paket.Tests/InstallModel/Xml/RxXaml.fs | 2 +- tests/Paket.Tests/InstallModel/Xml/SQLite.fs | 4 +- ...System.Security.Cryptography.Algorithms.fs | 2 +- .../InstallModel/Xml/System.Spatial.fs | 2 +- .../InstallModel/Xml/SystemNetHttp.fs | 2 +- ...mNetHttpWithExistingFrameworkReferences.fs | 2 +- .../SystemNetHttpWithFrameworkReferences.fs | 2 +- .../InstallModel/Xml/xunit.runner.fs | 2 +- tests/Paket.Tests/Paket.Tests.fsproj | 30 ++--- .../Versioning/PlatformMatchingSpecs.fs | 82 +++++++++++++ 42 files changed, 297 insertions(+), 197 deletions(-) diff --git a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj index 60c19028f0..36543a5bb9 100644 --- a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj +++ b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj @@ -49,7 +49,7 @@ - + <__paket__NUnit3TestAdapter_props>net35\NUnit3TestAdapter @@ -133,7 +133,7 @@ - + ..\..\packages\Chessie\lib\net40\Chessie.dll @@ -153,7 +153,7 @@ - + ..\..\packages\FSharp.Core\lib\net45\FSharp.Core.dll @@ -297,7 +297,7 @@ - + ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll @@ -376,7 +376,7 @@ - + ..\..\packages\NUnit\lib\net45\nunit.framework.dll @@ -701,7 +701,7 @@ - + ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll @@ -859,7 +859,7 @@ - + ..\..\packages\System.IO\lib\net462\System.IO.dll @@ -1369,7 +1369,7 @@ - + True @@ -1666,7 +1666,7 @@ - + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -1726,7 +1726,7 @@ - + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -1766,7 +1766,7 @@ - + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -2109,7 +2109,7 @@ - + ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll @@ -2138,7 +2138,7 @@ - + ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll @@ -2167,7 +2167,7 @@ - + ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll diff --git a/integrationtests/scenarios/i000346-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i000346-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 8773240f20..f44d316f35 100644 --- a/integrationtests/scenarios/i000346-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i000346-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -71,7 +71,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i001145-excludes/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001145-excludes/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 400212ae02..17715c0130 100644 --- a/integrationtests/scenarios/i001145-excludes/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001145-excludes/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -71,7 +71,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index f73653c2e1..cb4f660867 100644 --- a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -71,7 +71,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary2/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary2/MyClassLibrary.csprojtemplate index 12b9a45723..4a29b92b5e 100644 --- a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary2/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary2/MyClassLibrary.csprojtemplate @@ -291,7 +291,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary3/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary3/MyClassLibrary.csprojtemplate index 1cab8d97a5..fbc033a547 100644 --- a/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary3/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001219-props-files/before/MyClassLibrary/MyClassLibrary3/MyClassLibrary.csprojtemplate @@ -291,7 +291,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 6fb3d8bc09..35277d978c 100644 --- a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -100,7 +100,7 @@ - + True diff --git a/integrationtests/scenarios/i001333-dup-refs/before/ConsoleApplication1/ConsoleApplication1.fsprojtemplate b/integrationtests/scenarios/i001333-dup-refs/before/ConsoleApplication1/ConsoleApplication1.fsprojtemplate index 5dde9f16a6..6c30203ead 100644 --- a/integrationtests/scenarios/i001333-dup-refs/before/ConsoleApplication1/ConsoleApplication1.fsprojtemplate +++ b/integrationtests/scenarios/i001333-dup-refs/before/ConsoleApplication1/ConsoleApplication1.fsprojtemplate @@ -80,7 +80,7 @@ - + ..\packages\FSharp.Core\lib\net40\FSharp.Core.dll @@ -127,7 +127,7 @@ - + True @@ -168,7 +168,7 @@ - + ..\packages\Microsoft.Azure.KeyVault.Core\lib\net40\Microsoft.Azure.KeyVault.Core.dll @@ -188,7 +188,7 @@ - + ..\packages\Microsoft.Data.Edm\lib\net40\Microsoft.Data.Edm.dll @@ -208,7 +208,7 @@ - + ..\packages\Microsoft.Data.OData\lib\net40\Microsoft.Data.OData.dll @@ -228,7 +228,7 @@ - + ..\packages\Microsoft.Data.Services.Client\lib\net40\Microsoft.Data.Services.Client.dll @@ -248,7 +248,7 @@ - + ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll @@ -277,7 +277,7 @@ - + ..\packages\System.Spatial\lib\net40\System.Spatial.dll @@ -297,7 +297,7 @@ - + True @@ -359,7 +359,7 @@ - + ..\packages\Zlib.Portable\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll diff --git a/integrationtests/scenarios/i001427-content-none/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-content-none/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 1c63b9dccf..c87351eae1 100644 --- a/integrationtests/scenarios/i001427-content-none/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-content-none/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -45,7 +45,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 5566e35e82..256680861a 100644 --- a/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -57,7 +57,7 @@ --> - + <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody diff --git a/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected b/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected index 118b48d610..f4200f18fd 100644 --- a/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected +++ b/integrationtests/scenarios/i001427-content-once-remove/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected @@ -47,7 +47,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001427-content-once-stable/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-content-once-stable/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index e502fc3432..f9354d21d1 100644 --- a/integrationtests/scenarios/i001427-content-once-stable/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-content-once-stable/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -48,7 +48,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index b2a3b51194..3f5b5bdcc1 100644 --- a/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -52,7 +52,7 @@ --> - + <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody diff --git a/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected b/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected index 3a19e129ed..20683054db 100644 --- a/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected +++ b/integrationtests/scenarios/i001427-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected @@ -46,7 +46,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001427-content-true/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-content-true/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 212a07e3ea..038e811546 100644 --- a/integrationtests/scenarios/i001427-content-true/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-content-true/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -48,7 +48,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001427-ref-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001427-ref-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index e502fc3432..f9354d21d1 100644 --- a/integrationtests/scenarios/i001427-ref-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001427-ref-content-once/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -48,7 +48,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001467-cpp/before/MyClassLibrary/ConsoleApplication1/ConsoleApplication1.vcxprojtemplate b/integrationtests/scenarios/i001467-cpp/before/MyClassLibrary/ConsoleApplication1/ConsoleApplication1.vcxprojtemplate index aba00003be..c99ea4747b 100644 --- a/integrationtests/scenarios/i001467-cpp/before/MyClassLibrary/ConsoleApplication1/ConsoleApplication1.vcxprojtemplate +++ b/integrationtests/scenarios/i001467-cpp/before/MyClassLibrary/ConsoleApplication1/ConsoleApplication1.vcxprojtemplate @@ -128,7 +128,7 @@ - + ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll diff --git a/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csproj.expected b/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csproj.expected index c0fbb66081..36f7a2a0bf 100644 --- a/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csproj.expected +++ b/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csproj.expected @@ -78,7 +78,7 @@ --> - + ..\..\packages\EasyNetQ\lib\net45\EasyNetQ.dll @@ -98,7 +98,7 @@ - + ..\..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist\lib\net46\Microsoft.Diagnostics.Tracing.EventSource.dll @@ -109,7 +109,7 @@ - + ..\..\packages\RabbitMQ.Client\lib\net451\RabbitMQ.Client.dll diff --git a/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 5a9046142d..91fbe70cc8 100644 --- a/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001505-conditionals/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -78,7 +78,7 @@ --> - + ..\..\packages\EasyNetQ\lib\net45\EasyNetQ.dll @@ -89,7 +89,7 @@ - + ..\..\packages\RabbitMQ.Client\lib\net451\RabbitMQ.Client.dll diff --git a/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 0c1247f729..ed47a9ad64 100644 --- a/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -48,7 +48,7 @@ - + <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody diff --git a/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected b/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected index 92bba90dbf..4ad57768d8 100644 --- a/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected +++ b/integrationtests/scenarios/i001522-copy-content/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.expected @@ -48,7 +48,7 @@ - + <__paket__Fody_targets>netstandard1.4\Fody diff --git a/integrationtests/scenarios/i001578-transitive-ref/before/TestPaketDotNet/TestPaketDotNet.csprojtemplate b/integrationtests/scenarios/i001578-transitive-ref/before/TestPaketDotNet/TestPaketDotNet.csprojtemplate index 658728fa0d..9c35a912ac 100644 --- a/integrationtests/scenarios/i001578-transitive-ref/before/TestPaketDotNet/TestPaketDotNet.csprojtemplate +++ b/integrationtests/scenarios/i001578-transitive-ref/before/TestPaketDotNet/TestPaketDotNet.csprojtemplate @@ -104,7 +104,7 @@ - + ..\packages\Octokit\lib\net45\Octokit.dll diff --git a/integrationtests/scenarios/i001732-lowercase-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001732-lowercase-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 8773240f20..f44d316f35 100644 --- a/integrationtests/scenarios/i001732-lowercase-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001732-lowercase-aliases/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -71,7 +71,7 @@ - + ..\..\packages\Dapper\lib\net45\Dapper.dll diff --git a/integrationtests/scenarios/i002335-razorengine/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i002335-razorengine/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 6182de0f2e..bc86ceff9d 100644 --- a/integrationtests/scenarios/i002335-razorengine/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i002335-razorengine/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -376,7 +376,7 @@ - + ..\..\packages\net45\Microsoft.AspNet.Razor\lib\net45\System.Web.Razor.dll @@ -387,7 +387,7 @@ - + ..\..\packages\razor4\Microsoft.AspNetCore.Razor\lib\net451\Microsoft.AspNetCore.Razor.dll @@ -407,7 +407,7 @@ - + True @@ -455,7 +455,7 @@ - + ..\..\packages\razor4\System.AppContext\lib\net463\System.AppContext.dll @@ -493,7 +493,7 @@ - + ..\..\packages\razor4\System.Buffers\lib\netstandard1.1\System.Buffers.dll @@ -544,7 +544,7 @@ - + ..\..\packages\razor4\System.Console\lib\net46\System.Console.dll @@ -575,7 +575,7 @@ - + ..\..\packages\razor4\System.Diagnostics.DiagnosticSource\lib\net46\System.Diagnostics.DiagnosticSource.dll @@ -624,7 +624,7 @@ - + ..\..\packages\razor4\System.Diagnostics.Tracing\lib\net462\System.Diagnostics.Tracing.dll @@ -673,7 +673,7 @@ - + ..\..\packages\razor4\System.Globalization.Calendars\lib\net46\System.Globalization.Calendars.dll @@ -702,7 +702,7 @@ - + ..\..\packages\razor4\System.Globalization.Extensions\lib\net46\System.Globalization.Extensions.dll @@ -731,7 +731,7 @@ - + ..\..\packages\razor4\System.IO\lib\net462\System.IO.dll @@ -790,7 +790,7 @@ - + ..\..\packages\razor4\System.IO.Compression\lib\net46\System.IO.Compression.dll @@ -847,7 +847,7 @@ - + True @@ -888,7 +888,7 @@ - + ..\..\packages\razor4\System.IO.FileSystem\lib\net46\System.IO.FileSystem.dll @@ -917,7 +917,7 @@ - + ..\..\packages\razor4\System.IO.FileSystem.Primitives\lib\net46\System.IO.FileSystem.Primitives.dll @@ -955,7 +955,7 @@ - + ..\..\packages\razor4\System.Linq\lib\net463\System.Linq.dll @@ -1002,7 +1002,7 @@ - + ..\..\packages\razor4\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll @@ -1077,7 +1077,7 @@ - + ..\..\packages\razor4\System.Net.Http\lib\net46\System.Net.Http.dll @@ -1138,7 +1138,7 @@ - + ..\..\packages\razor4\System.Net.Sockets\lib\net46\System.Net.Sockets.dll @@ -1187,7 +1187,7 @@ - + ..\..\packages\razor4\System.Reflection\lib\net462\System.Reflection.dll @@ -1323,7 +1323,7 @@ - + ..\..\packages\razor4\System.Reflection.TypeExtensions\lib\net462\System.Reflection.TypeExtensions.dll @@ -1379,7 +1379,7 @@ - + True @@ -1420,7 +1420,7 @@ - + ..\..\packages\razor4\System.Runtime.Extensions\lib\net462\System.Runtime.Extensions.dll @@ -1485,7 +1485,7 @@ - + ..\..\packages\razor4\System.Runtime.InteropServices\lib\net463\System.Runtime.InteropServices.dll @@ -1523,7 +1523,7 @@ - + ..\..\packages\razor4\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll @@ -1561,7 +1561,7 @@ - + True @@ -1629,7 +1629,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -1708,7 +1708,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.Cng\lib\net463\System.Security.Cryptography.Cng.dll @@ -1737,7 +1737,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.Csp\lib\net46\System.Security.Cryptography.Csp.dll @@ -1766,7 +1766,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -1815,7 +1815,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -1869,7 +1869,7 @@ - + ..\..\packages\razor4\System.Security.Cryptography.X509Certificates\lib\net461\System.Security.Cryptography.X509Certificates.dll @@ -1929,7 +1929,7 @@ - + ..\..\packages\razor4\System.Text.RegularExpressions\lib\net463\System.Text.RegularExpressions.dll @@ -2007,7 +2007,7 @@ - + ..\..\packages\razor4\System.Threading.Tasks.Extensions\lib\netstandard1.0\System.Threading.Tasks.Extensions.dll @@ -2027,7 +2027,7 @@ - + ..\..\packages\razor4\System.Threading.Thread\lib\net46\System.Threading.Thread.dll @@ -2083,7 +2083,7 @@ - + True @@ -2115,7 +2115,7 @@ - + True diff --git a/src/Paket.Core/Paket.Core.fsproj b/src/Paket.Core/Paket.Core.fsproj index 32431fec75..e4c721f77f 100644 --- a/src/Paket.Core/Paket.Core.fsproj +++ b/src/Paket.Core/Paket.Core.fsproj @@ -157,7 +157,7 @@ - + ..\..\packages\Chessie\lib\net40\Chessie.dll @@ -177,7 +177,7 @@ - + ..\..\packages\FSharp.Core\lib\net45\FSharp.Core.dll @@ -296,7 +296,7 @@ - + ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll @@ -373,7 +373,7 @@ - + ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll @@ -816,7 +816,7 @@ - + ..\..\packages\System.IO\lib\net462\System.IO.dll @@ -1319,7 +1319,7 @@ - + True @@ -1590,7 +1590,7 @@ - + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -1650,7 +1650,7 @@ - + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -1690,7 +1690,7 @@ - + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -2033,7 +2033,7 @@ - + ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll diff --git a/src/Paket.Core/Versioning/FrameworkHandling.fs b/src/Paket.Core/Versioning/FrameworkHandling.fs index d3383742aa..a0742e9c99 100644 --- a/src/Paket.Core/Versioning/FrameworkHandling.fs +++ b/src/Paket.Core/Versioning/FrameworkHandling.fs @@ -152,7 +152,9 @@ type UAPVersion = match this with // Assumed from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore | UAPVersion.V10 -> "v5.0" - | UAPVersion.V10_1 -> "v5.1" + // No idea, for now use 5.0 to keep project files constant + // If someone starts complaining fix this and update the baselines. + | UAPVersion.V10_1 -> "v5.0" static member TryParse s = match s with @@ -224,20 +226,20 @@ type DotNetUnityVersion = module KnownAliases = let Data = - [".net", "net" - "netframework", "net" - ".netframework", "net" + [".netframework", "net" ".netcore", "netcore" ".netplatform", "dotnet" + ".netportable", "portable" + "netframework", "net" "netplatform", "dotnet" "winrt", "netcore" "silverlight", "sl" - "windowsPhoneApp", "wpa" + "windowsphoneapp", "wpa" "windowsphone", "wp" "windows", "win" - ".netportable", "portable" "xamarin.", "xamarin" "netportable", "portable" + ".net", "net" " ", "" ] |> List.map (fun (p,r) -> p.ToLower(),r.ToLower()) let normalizeFramework (path:string) = @@ -305,20 +307,16 @@ type WindowsPhoneVersion = | _ -> None [] type WindowsPhoneAppVersion = - | V8 | V8_1 member this.ShortString() = match this with - | WindowsPhoneAppVersion.V8 -> "8" | WindowsPhoneAppVersion.V8_1 -> "81" override this.ToString() = match this with - | WindowsPhoneAppVersion.V8 -> "v8.0" | WindowsPhoneAppVersion.V8_1 -> "v8.1" static member TryParse s = match s with - | "" | "0" | "8" -> Some WindowsPhoneAppVersion.V8 - | "8.1" -> Some WindowsPhoneAppVersion.V8_1 + | "" | "8.1" -> Some WindowsPhoneAppVersion.V8_1 | _ -> None [] type SilverlightVersion = @@ -581,7 +579,6 @@ type FrameworkIdentifier = | Windows WindowsVersion.V8 -> [ ] | Windows WindowsVersion.V8_1 -> [ Windows WindowsVersion.V8 ] | Windows WindowsVersion.V10 -> [ Windows WindowsVersion.V8_1 ] - | WindowsPhoneApp WindowsPhoneAppVersion.V8 -> [ ] | WindowsPhoneApp WindowsPhoneAppVersion.V8_1 -> [ DotNetStandard DotNetStandardVersion.V1_2 ] | WindowsPhone WindowsPhoneVersion.V7 -> [ ] | WindowsPhone WindowsPhoneVersion.V7_1 -> [ WindowsPhone WindowsPhoneVersion.V7 ] @@ -961,6 +958,12 @@ type TargetProfile = | _ -> false module KnownTargetProfiles = + // These lists are used primarilty when calculating stuff which requires iterating over ALL profiles + // - Restriction System: "NOT" function + // - Generation of Project-File Conditions + // - Penalty system (to calculate best matching framework) + // For this reason there is a test to ensure those lists are up2date. + let DotNetFrameworkVersions = [ FrameworkVersion.V1 FrameworkVersion.V1_1 @@ -978,6 +981,7 @@ module KnownTargetProfiles = FrameworkVersion.V4_6_2 FrameworkVersion.V4_6_3 FrameworkVersion.V4_7 + FrameworkVersion.V5_0 ] let DotNetFrameworkIdentifiers = @@ -1002,7 +1006,7 @@ module KnownTargetProfiles = let DotNetStandardProfiles = DotNetStandardVersions |> List.map (DotNetStandard >> SinglePlatform) - + let DotNetCoreAppVersions = [ DotNetCoreAppVersion.V1_0 DotNetCoreAppVersion.V1_1 @@ -1015,7 +1019,7 @@ module KnownTargetProfiles = DotNetUnityVersion.V3_5_Micro DotNetUnityVersion.V3_5_Web ] - + let DotNetCoreProfiles = DotNetCoreAppVersions |> List.map (DotNetCoreApp >> SinglePlatform) @@ -1030,10 +1034,10 @@ module KnownTargetProfiles = WindowsVersions |> List.map (Windows >> SinglePlatform) - let DotNetUnityProfiles = + let DotNetUnityProfiles = DotNetUnityVersions |> List.map (DotNetUnity >> SinglePlatform) - + let SilverlightVersions = [ SilverlightVersion.V3 SilverlightVersion.V4 @@ -1065,8 +1069,14 @@ module KnownTargetProfiles = MonoAndroidVersions |> List.map (MonoAndroid >> SinglePlatform) + let UAPVersons = [ + UAPVersion.V10 + UAPVersion.V10_1 + ] + let UAPProfiles = - [SinglePlatform(UAP UAPVersion.V10)] + UAPVersons + |> List.map (UAP >> SinglePlatform) let WindowsPhoneVersions = [ WindowsPhoneVersion.V7 @@ -1080,35 +1090,43 @@ module KnownTargetProfiles = WindowsPhoneVersions |> List.map (WindowsPhone >> SinglePlatform) + let WindowsPhoneAppVersions = [ + WindowsPhoneAppVersion.V8_1 + ] + + let WindowsPhoneAppProfiles = + WindowsPhoneAppVersions + |> List.map (WindowsPhoneApp >> SinglePlatform) + // http://nugettoolsdev.azurewebsites.net/4.0.0/parse-framework?framework=.NETPortable%2CVersion%3Dv0.0%2CProfile%3DProfile3 let AllPortableProfiles = - [PortableProfileType.Profile2 - PortableProfileType.Profile3 - PortableProfileType.Profile4 - PortableProfileType.Profile5 - PortableProfileType.Profile6 - PortableProfileType.Profile7 - PortableProfileType.Profile14 - PortableProfileType.Profile18 - PortableProfileType.Profile19 - PortableProfileType.Profile23 - PortableProfileType.Profile24 - PortableProfileType.Profile31 - PortableProfileType.Profile32 - PortableProfileType.Profile36 - PortableProfileType.Profile37 - PortableProfileType.Profile41 - PortableProfileType.Profile42 - PortableProfileType.Profile44 - PortableProfileType.Profile46 - PortableProfileType.Profile47 - PortableProfileType.Profile49 - PortableProfileType.Profile78 - PortableProfileType.Profile84 - PortableProfileType.Profile88 - PortableProfileType.Profile92 - PortableProfileType.Profile95 - PortableProfileType.Profile96 + [PortableProfileType.Profile2 + PortableProfileType.Profile3 + PortableProfileType.Profile4 + PortableProfileType.Profile5 + PortableProfileType.Profile6 + PortableProfileType.Profile7 + PortableProfileType.Profile14 + PortableProfileType.Profile18 + PortableProfileType.Profile19 + PortableProfileType.Profile23 + PortableProfileType.Profile24 + PortableProfileType.Profile31 + PortableProfileType.Profile32 + PortableProfileType.Profile36 + PortableProfileType.Profile37 + PortableProfileType.Profile41 + PortableProfileType.Profile42 + PortableProfileType.Profile44 + PortableProfileType.Profile46 + PortableProfileType.Profile47 + PortableProfileType.Profile49 + PortableProfileType.Profile78 + PortableProfileType.Profile84 + PortableProfileType.Profile88 + PortableProfileType.Profile92 + PortableProfileType.Profile95 + PortableProfileType.Profile96 PortableProfileType.Profile102 PortableProfileType.Profile104 PortableProfileType.Profile111 @@ -1130,7 +1148,8 @@ module KnownTargetProfiles = let AllDotNetProfiles = DotNetFrameworkProfiles @ DotNetUnityProfiles @ - WindowsProfiles @ + WindowsProfiles @ + WindowsPhoneAppProfiles @ UAPProfiles @ SilverlightProfiles @ WindowsPhoneSilverlightProfiles @ @@ -1139,8 +1158,7 @@ module KnownTargetProfiles = SinglePlatform(XamariniOS) SinglePlatform(XamarinMac) SinglePlatform(XamarinTV) - SinglePlatform(XamarinWatch) - SinglePlatform(WindowsPhoneApp WindowsPhoneAppVersion.V8_1)] @ + SinglePlatform(XamarinWatch)] @ (AllPortableProfiles |> List.map PortableProfile) let AllDotNetStandardAndCoreProfiles = diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 98042c8bfa..22620845fc 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -105,7 +105,7 @@ - + ..\..\packages\Argu\lib\net40\Argu.dll @@ -125,7 +125,7 @@ - + ..\..\packages\Chessie\lib\net40\Chessie.dll @@ -145,7 +145,7 @@ - + ..\..\packages\FSharp.Core\lib\net45\FSharp.Core.dll @@ -434,7 +434,7 @@ - + ..\..\packages\System.IO\lib\net462\System.IO.dll @@ -937,7 +937,7 @@ - + True @@ -1159,7 +1159,7 @@ - + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -1219,7 +1219,7 @@ - + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -1259,7 +1259,7 @@ - + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -1573,7 +1573,7 @@ - + True diff --git a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj index 3cb4b22e94..698c048008 100644 --- a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj +++ b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj @@ -54,7 +54,7 @@ - + <__paket__NUnit3TestAdapter_props>net35\NUnit3TestAdapter @@ -90,7 +90,7 @@ - + ..\..\packages\Castle.Core\lib\net45\Castle.Core.dll @@ -155,7 +155,7 @@ - + ..\..\packages\Moq\lib\net45\Moq.dll @@ -207,7 +207,7 @@ - + ..\..\packages\NUnit\lib\net45\nunit.framework.dll @@ -532,7 +532,7 @@ - + True @@ -575,7 +575,7 @@ - + ..\..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll @@ -713,7 +713,7 @@ - + ..\..\packages\System.IO\lib\net462\System.IO.dll @@ -1225,7 +1225,7 @@ - + True @@ -1473,7 +1473,7 @@ - + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -1533,7 +1533,7 @@ - + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -1573,7 +1573,7 @@ - + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -1870,7 +1870,7 @@ - + True @@ -1906,7 +1906,7 @@ - + ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll @@ -1935,7 +1935,7 @@ - + ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll @@ -1964,7 +1964,7 @@ - + ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/ControlzEx.fs b/tests/Paket.Tests/InstallModel/Xml/ControlzEx.fs index b593ff413a..8ec317bf4e 100644 --- a/tests/Paket.Tests/InstallModel/Xml/ControlzEx.fs +++ b/tests/Paket.Tests/InstallModel/Xml/ControlzEx.fs @@ -37,7 +37,7 @@ let expectedWithoutSpecificVersion = """ - + ..\..\..\ControlzEx\lib\net462\ControlzEx.dll @@ -87,7 +87,7 @@ let expectedWithSpecificVersionSetToTrue = """ - + ..\..\..\ControlzEx\lib\net462\ControlzEx.dll @@ -139,7 +139,7 @@ let expectedWithSpecificVersionSetToFalse = """ - + ..\..\..\ControlzEx\lib\net462\ControlzEx.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/FSharp.Data.SqlClient.fs b/tests/Paket.Tests/InstallModel/Xml/FSharp.Data.SqlClient.fs index 4b870f5c46..372a9d9214 100644 --- a/tests/Paket.Tests/InstallModel/Xml/FSharp.Data.SqlClient.fs +++ b/tests/Paket.Tests/InstallModel/Xml/FSharp.Data.SqlClient.fs @@ -10,7 +10,7 @@ open System.IO let expected = """ - + True diff --git a/tests/Paket.Tests/InstallModel/Xml/LibGit2Sharp.fs b/tests/Paket.Tests/InstallModel/Xml/LibGit2Sharp.fs index 07d8d5335a..8fc8f95821 100644 --- a/tests/Paket.Tests/InstallModel/Xml/LibGit2Sharp.fs +++ b/tests/Paket.Tests/InstallModel/Xml/LibGit2Sharp.fs @@ -9,7 +9,7 @@ open Paket.Requirements let expectedReferenceNodes = """ - + ..\..\..\LibGit2Sharp\lib\net40\LibGit2Sharp.dll @@ -22,7 +22,7 @@ let expectedReferenceNodes = """ let expectedPropertyDefinitionNodes = """ - + <__paket__LibGit2Sharp_props>net40\LibGit2Sharp diff --git a/tests/Paket.Tests/InstallModel/Xml/Plossum.fs b/tests/Paket.Tests/InstallModel/Xml/Plossum.fs index c154a1daa9..c632647342 100644 --- a/tests/Paket.Tests/InstallModel/Xml/Plossum.fs +++ b/tests/Paket.Tests/InstallModel/Xml/Plossum.fs @@ -9,7 +9,7 @@ open Paket.Requirements let expected = """ - + ..\..\..\Plossum.CommandLine\lib\net40\Plossum CommandLine.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs b/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs index be005b7b09..d489c0b613 100644 --- a/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs +++ b/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs @@ -21,7 +21,7 @@ let expected = """ - + True diff --git a/tests/Paket.Tests/InstallModel/Xml/SQLite.fs b/tests/Paket.Tests/InstallModel/Xml/SQLite.fs index 48dc826762..2449fa1fa3 100644 --- a/tests/Paket.Tests/InstallModel/Xml/SQLite.fs +++ b/tests/Paket.Tests/InstallModel/Xml/SQLite.fs @@ -40,7 +40,7 @@ let expectedReferenceNodes = """ - + ..\..\..\System.Data.SQLite.Core\lib\net451\System.Data.SQLite.dll @@ -69,7 +69,7 @@ let expectedPropertyDefinitionNodes = """ <__paket__System_Data_SQLite_Core_targets>net45\System.Data.SQLite.Core - + <__paket__System_Data_SQLite_Core_targets>net451\System.Data.SQLite.Core diff --git a/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs b/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs index 60c9d7e8d0..db4720a820 100644 --- a/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs +++ b/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs @@ -27,7 +27,7 @@ let expected = """ - + ..\..\..\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/System.Spatial.fs b/tests/Paket.Tests/InstallModel/Xml/System.Spatial.fs index 5885fdbb50..4fae5c7cad 100644 --- a/tests/Paket.Tests/InstallModel/Xml/System.Spatial.fs +++ b/tests/Paket.Tests/InstallModel/Xml/System.Spatial.fs @@ -9,7 +9,7 @@ open Paket.Requirements let expected = """ - + ..\..\..\System.Spatial\lib\net40\System.Spatial.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttp.fs b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttp.fs index 6ec19bee94..9938c69cfe 100644 --- a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttp.fs +++ b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttp.fs @@ -61,7 +61,7 @@ let expected = """ - + ..\..\..\Microsoft.Net.Http\lib\net45\System.Net.Http.Extensions.dll diff --git a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithExistingFrameworkReferences.fs b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithExistingFrameworkReferences.fs index 9d21ab882a..01a148e6f5 100644 --- a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithExistingFrameworkReferences.fs +++ b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithExistingFrameworkReferences.fs @@ -28,7 +28,7 @@ let expected = """ - + True diff --git a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithFrameworkReferences.fs b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithFrameworkReferences.fs index 2291d04924..40afd9a853 100644 --- a/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithFrameworkReferences.fs +++ b/tests/Paket.Tests/InstallModel/Xml/SystemNetHttpWithFrameworkReferences.fs @@ -33,7 +33,7 @@ let expected = """ - + True diff --git a/tests/Paket.Tests/InstallModel/Xml/xunit.runner.fs b/tests/Paket.Tests/InstallModel/Xml/xunit.runner.fs index 6d77aa9646..1aa0745651 100644 --- a/tests/Paket.Tests/InstallModel/Xml/xunit.runner.fs +++ b/tests/Paket.Tests/InstallModel/Xml/xunit.runner.fs @@ -15,7 +15,7 @@ let expectedPropertyNodes = """ let expectedPropertyDefinitionNodes = """ - + <__paket__xunit_runner_visualstudio_props>net20\xunit.runner.visualstudio diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj index 23f6ea26ac..444c58a370 100644 --- a/tests/Paket.Tests/Paket.Tests.fsproj +++ b/tests/Paket.Tests/Paket.Tests.fsproj @@ -45,7 +45,7 @@ - + <__paket__NUnit3TestAdapter_props>net35\NUnit3TestAdapter @@ -368,7 +368,7 @@ - + ..\..\packages\Chessie\lib\net40\Chessie.dll @@ -388,7 +388,7 @@ - + ..\..\packages\FsCheck\lib\net452\FsCheck.dll @@ -435,7 +435,7 @@ - + ..\..\packages\FSharp.Core\lib\net45\FSharp.Core.dll @@ -579,7 +579,7 @@ - + ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll @@ -658,7 +658,7 @@ - + ..\..\packages\NUnit\lib\net45\nunit.framework.dll @@ -983,7 +983,7 @@ - + ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll @@ -1141,7 +1141,7 @@ - + ..\..\packages\System.IO\lib\net462\System.IO.dll @@ -1684,7 +1684,7 @@ - + True @@ -1981,7 +1981,7 @@ - + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll @@ -2041,7 +2041,7 @@ - + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll @@ -2081,7 +2081,7 @@ - + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll @@ -2424,7 +2424,7 @@ - + ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll @@ -2453,7 +2453,7 @@ - + ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll @@ -2482,7 +2482,7 @@ - + ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll diff --git a/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs b/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs index d0a1d8d4c9..e464c21111 100644 --- a/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs +++ b/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs @@ -4,6 +4,48 @@ open Paket open NUnit.Framework open FsUnit + +[] +let ``Check that lists are updated``() = + // If this test fails it most likely means you need to + // - Update the lists in KnownTargetProfiles + // - Update base-lines (ie run Integration-Test-Suite) with update-base-lines set to true + // - Review the diff + find a reviewer (on the PR) if you are unsure + // - (In Extreme cases) Update this test. + + let checkListEx (tagReader:obj -> int) (cases:Reflection.UnionCaseInfo[]) (l:'t list) = + let tags = l |> List.map tagReader + cases + |> Seq.forall (fun case -> + let foundCase = tags |> Seq.contains (case.Tag) + if not foundCase then + Assert.Fail (sprintf "Case '%s' was not found in KnownTargetProfiles.Versions for '%s'" case.Name typeof<'t>.Name) + foundCase) + |> shouldEqual true + if l.Length <> cases.Length then + Assert.Fail (sprintf "KnownTargetProfiles. doesnt't match number of cases for '%s'." typeof<'t>.Name) + let checkList (l:'t list) = + let tagReader = FSharp.Reflection.FSharpValue.PreComputeUnionTagReader(typeof<'t>) + let cases = FSharp.Reflection.FSharpType.GetUnionCases(typeof<'t>) + checkListEx tagReader cases l + checkList KnownTargetProfiles.DotNetFrameworkVersions + checkList KnownTargetProfiles.DotNetCoreAppVersions + checkList KnownTargetProfiles.DotNetStandardVersions + checkList KnownTargetProfiles.DotNetUnityVersions + checkList KnownTargetProfiles.MonoAndroidVersions + checkList KnownTargetProfiles.SilverlightVersions + checkList KnownTargetProfiles.UAPVersons + checkList KnownTargetProfiles.WindowsPhoneAppVersions + checkList KnownTargetProfiles.WindowsPhoneVersions + checkList KnownTargetProfiles.WindowsVersions + + let reader = FSharp.Reflection.FSharpValue.PreComputeUnionTagReader(typeof) + let unsupportedTag = reader(PortableProfileType.UnsupportedProfile []) + let cases = + FSharp.Reflection.FSharpType.GetUnionCases(typeof) + |> Array.filter(fun case -> case.Tag <> unsupportedTag) + checkListEx reader cases KnownTargetProfiles.AllPortableProfiles + [] let ``Can detect uap10``() = let p = PlatformMatching.forceExtractPlatforms "uap10" @@ -29,6 +71,26 @@ let ``Can detect netcore1.0``() = let p = PlatformMatching.forceExtractPlatforms "netcore1.0" p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.DotNetCoreApp DotNetCoreAppVersion.V1_0))) +[] +let ``Can detect wpa``() = + let p = PlatformMatching.forceExtractPlatforms "wpa" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.WindowsPhoneApp WindowsPhoneAppVersion.V8_1))) + +[] +let ``Can detect wpav8.1``() = + let p = PlatformMatching.forceExtractPlatforms "wpav8.1" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.WindowsPhoneApp WindowsPhoneAppVersion.V8_1))) + +[] +let ``Can detect wpv8.0``() = + let p = PlatformMatching.forceExtractPlatforms "wpv8.0" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.WindowsPhone WindowsPhoneVersion.V8))) + +[] +let ``Can detect winv4.5``() = + let p = PlatformMatching.forceExtractPlatforms "winv4.5" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.Windows WindowsVersion.V8))) + [] let ``Can detect uap101``() = // Currently required for backwards compat (2017-08-20), as we wrote these incorrectly in previous versions. @@ -46,6 +108,26 @@ let ``Can detect MonoTouch0.00``() = let p = PlatformMatching.forceExtractPlatforms "MonoTouch0.00" p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.MonoTouch))) +[] +let ``Can detect WindowsPhoneApp0.0``() = + let p = PlatformMatching.forceExtractPlatforms "WindowsPhoneApp0.0" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.WindowsPhoneApp WindowsPhoneAppVersion.V8_1))) + +[] +let ``Can detect WindowsPhone8.0``() = + let p = PlatformMatching.forceExtractPlatforms "WindowsPhone8.0" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.WindowsPhone WindowsPhoneVersion.V8))) + +[] +let ``Can detect Windows8.0``() = + let p = PlatformMatching.forceExtractPlatforms "Windows8.0" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.Windows WindowsVersion.V8))) + +[] +let ``Can detect .NETFramework4.0-Client``() = + let p = PlatformMatching.forceExtractPlatforms ".NETFramework4.0-Client" + p.ToTargetProfile false |> shouldEqual (Some (SinglePlatform (FrameworkIdentifier.DotNetFramework FrameworkVersion.V4))) + [] let ``Can detect MonoAndroid0.0``() = let p = PlatformMatching.forceExtractPlatforms "MonoAndroid0.0"