From 924258a1521bbe867cffbaf56c583b4d5ec0cdb5 Mon Sep 17 00:00:00 2001 From: Lukas Rieger Date: Tue, 11 Apr 2017 21:40:04 +0200 Subject: [PATCH 1/2] import .props/.targets better fixes https://github.com/fsprojects/Paket/issues/2227 * differentiate between global targets/props, and framework specific targets/props * fw-specifc targets/props continue to be imported in the the middle with a condition (no change to before) * global props are imported at the top of the file (same as nuget does) * global targets are imported at the end of the file (same as nuget) The reason is that many props depend on being imported at the top, so do that for the files where it is actually possible. --- .../MyClassLibrary.csprojtemplate | 12 +- .../xUnitTests.expected.csprojtemplate | 9 +- src/Paket.Core/Files/ProjectFile.fs | 175 ++++++++++++------ src/Paket/Paket.fsproj | 4 +- .../InstallModel/Xml/CodeCracker.fs | 12 +- .../Paket.Tests/InstallModel/Xml/EmptyLibs.fs | 4 +- .../InstallModel/Xml/FSharp.Data.SqlClient.fs | 4 +- .../Paket.Tests/InstallModel/Xml/Fantomas.fs | 7 +- .../InstallModel/Xml/FantomasLib.fs | 4 +- tests/Paket.Tests/InstallModel/Xml/Fuchu.fs | 4 +- .../InstallModel/Xml/GitInfoPlanter.fs | 14 +- .../InstallModel/Xml/LibGit2Sharp.fs | 14 +- .../InstallModel/Xml/Microsoft.Bcl.Build.fs | 7 +- .../Xml/Microsoft.CodeAnalysis.Analyzers.fs | 12 +- tests/Paket.Tests/InstallModel/Xml/Plossum.fs | 4 +- .../InstallModel/Xml/RefactoringEssentials.fs | 8 +- tests/Paket.Tests/InstallModel/Xml/RxXaml.fs | 4 +- tests/Paket.Tests/InstallModel/Xml/SQLite.fs | 14 +- .../InstallModel/Xml/StyleCop.MSBuild.fs | 13 +- ...System.Security.Cryptography.Algorithms.fs | 4 +- .../InstallModel/Xml/System.Spatial.fs | 4 +- .../InstallModel/Xml/SystemNetHttp.fs | 4 +- .../InstallModel/Xml/SystemNetHttpForNet4.fs | 4 +- ...mNetHttpWithExistingFrameworkReferences.fs | 4 +- .../SystemNetHttpWithFrameworkReferences.fs | 4 +- .../InstallModel/Xml/xunit.runner.fs | 24 +-- 26 files changed, 219 insertions(+), 154 deletions(-) diff --git a/integrationtests/scenarios/i001487-stable-props/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate b/integrationtests/scenarios/i001487-stable-props/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate index 9c1303686e..8111003afd 100644 --- a/integrationtests/scenarios/i001487-stable-props/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate +++ b/integrationtests/scenarios/i001487-stable-props/before/MyClassLibrary/MyClassLibrary/MyClassLibrary.csprojtemplate @@ -1,5 +1,6 @@ + Debug 8.0.30703 @@ -69,15 +70,6 @@ - - - - <__paket__MultiTarget_props>MultiTarget - <__paket__MultiTarget_targets>MultiTarget - - - -