From c349139d190c714199803420dd22568450eb5524 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Tue, 1 Dec 2015 11:13:20 +0100 Subject: [PATCH] show that we install net461 - references #1270 --- .../Paket.IntegrationTests/InstallSpecs.fs | 11 +- .../before/MyClassLibrary/MyClassLibrary.sln | 27 +++++ .../MyClassLibrary/MyClassLibrary/Class1.cs | 12 ++ .../MyClassLibrary.csprojtemplate | 104 ++++++++++++++++++ .../MyClassLibrary/Properties/AssemblyInfo.cs | 36 ++++++ .../MyClassLibrary/paket.references | 1 + .../i001270-net461/before/paket.dependencies | 2 + src/Paket.Core/PlatformMatching.fs | 2 +- src/Paket/Paket.fsproj | 2 +- 9 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary.sln create mode 100644 integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Class1.cs create mode 100644 integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate create mode 100644 integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Properties/AssemblyInfo.cs create mode 100644 integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/paket.references create mode 100644 integrationtests/scenarios/i001270-net461/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/InstallSpecs.fs b/integrationtests/Paket.IntegrationTests/InstallSpecs.fs index fa49048a14..31bd339923 100644 --- a/integrationtests/Paket.IntegrationTests/InstallSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/InstallSpecs.fs @@ -52,4 +52,13 @@ let ``#1256 should report error in lock file``() = install "i001256-wrong-lock" |> ignore failwith "error expected" with - | exn when exn.Message.Contains("FAKE") && exn.Message.Contains("paket.lock") -> () \ No newline at end of file + | exn when exn.Message.Contains("FAKE") && exn.Message.Contains("paket.lock") -> () + +[] +let ``#1270 install net461``() = + let newLockFile = install "i001270-net461" + let newFile = Path.Combine(scenarioTempPath "i001270-net461","MyClassLibrary","MyClassLibrary","MyClassLibrary.csproj") + let oldFile = Path.Combine(originalScenarioPath "i001270-net461","MyClassLibrary","MyClassLibrary","MyClassLibrary.csprojtemplate") + let s1 = File.ReadAllText oldFile |> normalizeLineEndings + let s2 = File.ReadAllText newFile |> normalizeLineEndings + s1 |> shouldEqual s2 \ No newline at end of file diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary.sln b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary.sln new file mode 100644 index 0000000000..d319700402 --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{673951A0-5216-4FBD-BA08-7FA057D5CC0D}" + ProjectSection(SolutionItems) = preProject + ..\paket.dependencies = ..\paket.dependencies + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyClassLibrary", "MyClassLibrary\MyClassLibrary.csproj", "{CD678800-8DFC-4BB1-911A-7234F492EA29}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD678800-8DFC-4BB1-911A-7234F492EA29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD678800-8DFC-4BB1-911A-7234F492EA29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD678800-8DFC-4BB1-911A-7234F492EA29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD678800-8DFC-4BB1-911A-7234F492EA29}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Class1.cs b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Class1.cs new file mode 100644 index 0000000000..2580be441d --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Class1.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyClassLibrary +{ + public class Class1 + { + } +} diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate new file mode 100644 index 0000000000..97b6f1f633 --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {CD678800-8DFC-4BB1-911A-7234F492EA29} + Library + Properties + MyClassLibrary + MyClassLibrary + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + ..\..\packages\AlphaFS\lib\net35\AlphaFS.dll + True + True + + + True + + + + + + + ..\..\packages\AlphaFS\lib\net45\AlphaFS.dll + True + True + + + True + + + + + + + ..\..\packages\AlphaFS\lib\net40\AlphaFS.dll + True + True + + + True + + + + + + + ..\..\packages\AlphaFS\lib\net451\AlphaFS.dll + True + True + + + True + + + + + \ No newline at end of file diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Properties/AssemblyInfo.cs b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..7920bce104 --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyClassLibrary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyClassLibrary")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cd678800-8dfc-4bb1-911a-7234f492ea29")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/paket.references b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/paket.references new file mode 100644 index 0000000000..657d7d212d --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/MyClassLibrary/MyClassLibrary/paket.references @@ -0,0 +1 @@ +alphafs \ No newline at end of file diff --git a/integrationtests/scenarios/i001270-net461/before/paket.dependencies b/integrationtests/scenarios/i001270-net461/before/paket.dependencies new file mode 100644 index 0000000000..42087f989f --- /dev/null +++ b/integrationtests/scenarios/i001270-net461/before/paket.dependencies @@ -0,0 +1,2 @@ +source https://www.nuget.org/api/v2/ +nuget Alphafs \ No newline at end of file diff --git a/src/Paket.Core/PlatformMatching.fs b/src/Paket.Core/PlatformMatching.fs index 81b43d8d3b..7de60425bc 100644 --- a/src/Paket.Core/PlatformMatching.fs +++ b/src/Paket.Core/PlatformMatching.fs @@ -107,7 +107,7 @@ let rec findBestMatch (paths : string list) (targetProfile : TargetProfile) = // For a given list of paths and target profiles return tuples of paths with their supported target profiles. // Every target profile will only be listed for own path - the one that best supports it. -let getSupportedTargetProfiles (paths : string list) = +let getSupportedTargetProfiles (paths : string list) = KnownTargetProfiles.AllProfiles |> List.map (fun target -> findBestMatch paths target, target) |> List.collect (fun (path, target) -> diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index bc512f70ac..67a78255d6 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -45,7 +45,7 @@ d:\code\paketkopie d:\code\paketbug d:\code\paketrepro - D:\code\Paket\integrationtests\scenarios\i001253-unlisted\temp\ + D:\code\Paket\integrationtests\scenarios\i001270-net461\temp pdbonly