Skip to content

Commit

Permalink
Merge pull request #2234 from 0x53A/fix-2227
Browse files Browse the repository at this point in the history
[fix #2227] import .props/.targets better
  • Loading branch information
forki authored Apr 12, 2017
2 parents 73032cc + 45cefaf commit 2039fee
Show file tree
Hide file tree
Showing 28 changed files with 235 additions and 154 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\MultiTarget\build\MultiTarget.props" Condition="Exists('..\..\packages\MultiTarget\build\MultiTarget.props')" Label="Paket" />
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<ProductVersion>8.0.30703</ProductVersion>
Expand Down Expand Up @@ -69,15 +70,6 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.6')">
<PropertyGroup>
<__paket__MultiTarget_props>MultiTarget</__paket__MultiTarget_props>
<__paket__MultiTarget_targets>MultiTarget</__paket__MultiTarget_targets>
</PropertyGroup>
</When>
</Choose>
<Import Project="..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props" Condition="Exists('..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props')" Label="Paket" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down Expand Up @@ -120,5 +112,5 @@
</ItemGroup>
</When>
</Choose>
<Import Project="..\..\packages\MultiTarget\build\$(__paket__MultiTarget_targets).targets" Condition="Exists('..\..\packages\MultiTarget\build\$(__paket__MultiTarget_targets).targets')" Label="Paket" />
<Import Project="..\..\packages\MultiTarget\build\MultiTarget.targets" Condition="Exists('..\..\packages\MultiTarget\build\MultiTarget.targets')" Label="Paket" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5'">
<PropertyGroup>
<__paket__WebSharper_targets>WebSharper</__paket__WebSharper_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down Expand Up @@ -126,5 +119,5 @@
</ItemGroup>
</When>
</Choose>
<Import Project="..\packages\WebSharper\build\$(__paket__WebSharper_targets).targets" Condition="Exists('..\packages\WebSharper\build\$(__paket__WebSharper_targets).targets')" Label="Paket" />
<Import Project="..\packages\WebSharper\build\WebSharper.targets" Condition="Exists('..\packages\WebSharper\build\WebSharper.targets')" Label="Paket" />
</Project>
175 changes: 120 additions & 55 deletions src/Paket.Core/Files/ProjectFile.fs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<StartWorkingDirectory>D:\temp\coreclrtest</StartWorkingDirectory>
<StartArguments>install</StartArguments>
<StartWorkingDirectory>C:\dev\src\Paket\integrationtests\scenarios\loading-scripts\dependencies-file-flag\temp</StartWorkingDirectory>
<StartArguments>install</StartArguments>
<StartWorkingDirectory>C:\PROJ\FAKE\</StartWorkingDirectory>
<StartArguments>convert-from-nuget</StartArguments>
<StartWorkingDirectory>c:\users\lr\documents\visual studio 2017\Projects\PaketTest</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
12 changes: 6 additions & 6 deletions tests/Paket.Tests/InstallModel/Xml/CodeCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ let ``should generate Xml for codecracker.CSharp``() =

let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyCsharpGuid.csprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>() ,Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>() ,Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedCsharp)
Expand All @@ -55,8 +55,8 @@ let ``should generate Xml for codecracker.CSharp in VisualBasic project``() =

let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyVbGuid.vbprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedEmpty)
Expand Down Expand Up @@ -86,8 +86,8 @@ let ``should generate Xml for codecracker.VisualBasic``() =

let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyVbGuid.vbprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedVb)
5 changes: 3 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/EmptyLibs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ let expected = """

[<Test>]
let ``should generate Xml for framework references and empty libs``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "TempPkg", SemVer.Parse "0.1", [],
[ ],
[],
[],
Nuspec.Load("Nuspec/EmptyLibs.nuspec"))

let _,targetsNodes,chooseNode,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expected)
4 changes: 2 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/FSharp.Data.SqlClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let ``should generate Xml for FSharp.Data.SqlClient 1.4.4``() =
[],
Nuspec.Load("Nuspec/FSharp.Data.SqlClient.nuspec"))

let _,targetsNodes,chooseNode,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
let currentXML = chooseNode.Head.OuterXml |> normalizeXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
let currentXML = ctx.ChooseNodes.Head.OuterXml |> normalizeXml
currentXML
|> shouldEqual (normalizeXml expected)
12 changes: 9 additions & 3 deletions tests/Paket.Tests/InstallModel/Xml/Fantomas.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let expected = """

[<Test>]
let ``should generate Xml for Fantomas 1.5``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0", [],
[ @"..\Fantomas\lib\FantomasLib.dll"
Expand All @@ -27,12 +28,13 @@ let ``should generate Xml for Fantomas 1.5``() =
[],
Nuspec.Explicit ["FantomasLib.dll"])

let propertyNodes,targetsNodes,chooseNode,additionalNode, _ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expected)

propertyNodes |> Seq.length |> shouldEqual 0
ctx.FrameworkSpecificPropsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalPropsNodes |> Seq.length |> shouldEqual 0


let emptyDoc = """<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -54,6 +56,7 @@ let fullDoc = """<?xml version="1.0" encoding="utf-8"?>

[<Test>]
let ``should generate full Xml for Fantomas 1.5``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0", [],
[ @"..\Fantomas\lib\FantomasLib.dll"
Expand All @@ -75,6 +78,7 @@ let ``should generate full Xml for Fantomas 1.5``() =

[<Test>]
let ``should not generate full Xml for Fantomas 1.5 if not referenced``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0", [],
[ @"..\Fantomas\lib\FantomasLib.dll"
Expand Down Expand Up @@ -111,6 +115,7 @@ let fullDocWithRefernceCondition = """<?xml version="1.0" encoding="utf-8"?>

[<Test>]
let ``should generate full Xml with reference condition for Fantomas 1.5``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0", [],
[ @"..\Fantomas\lib\FantomasLib.dll"
Expand Down Expand Up @@ -152,6 +157,7 @@ let fullDocWithRefernceConditionAndFrameworkRestriction = """<?xml version="1.0"
let ``should generate full Xml with reference condition and framework restrictions without msbuild warning``() =
// msbuild triggers a warning MSB4130 when we leave out the quotes around $(LEGACY) and add the condition at the end
// It seems like the warning is triggered when there is an "Or" without parentheses somewhere
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0",
[ FrameworkRestriction.Exactly (FrameworkIdentifier.XamariniOS)
Expand Down
5 changes: 3 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/FantomasLib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let expected = """

[<Test>]
let ``should generate Xml for Fantomas 1.5``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Fantomas", SemVer.Parse "1.5.0", [],
[ @"..\Fantomas\Lib\FantomasLib.dll"
Expand All @@ -27,7 +28,7 @@ let ``should generate Xml for Fantomas 1.5``() =
[],
Nuspec.Explicit ["FantomasLib.dll"])

let _,targetsNodes,chooseNode,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some false,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some false,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expected)
4 changes: 2 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/Fuchu.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let ``should generate Xml for Fuchu 0.4``() =
[],
Nuspec.All)

let _,targetsNodes,chooseNode,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expected)
15 changes: 9 additions & 6 deletions tests/Paket.Tests/InstallModel/Xml/GitInfoPlanter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,28 @@ let expectedPropertyNodes = """<?xml version="1.0" encoding="utf-16"?>

[<Test>]
let ``should generate Xml for GitInfoPlanter2.0.0``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "GitInfoPlanter", SemVer.Parse "0.21", [],
[ ],
[ @"..\GitInfoPlanter\build\GitInfoPlanter.targets" ],
[],
Nuspec.All)

let propsNodes,targetsNodes,chooseNode,propertyChooseNode,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml emptyReferences)

propertyChooseNode.OuterXml
ctx.FrameworkSpecificPropertyChooseNode.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml emptyPropertyDefinitionNodes)

propsNodes |> Seq.length |> shouldEqual 0
targetsNodes |> Seq.length |> shouldEqual 1
ctx.FrameworkSpecificPropsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalPropsNodes |> Seq.length |> shouldEqual 0
ctx.FrameworkSpecificTargetsNodes |> Seq.length |> shouldEqual 1
ctx.GlobalTargetsNodes |> Seq.length |> shouldEqual 0

(targetsNodes |> Seq.head).OuterXml
(ctx.FrameworkSpecificTargetsNodes |> Seq.head).OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expectedPropertyNodes)
14 changes: 8 additions & 6 deletions tests/Paket.Tests/InstallModel/Xml/LibGit2Sharp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,20 @@ let ``should generate Xml for LibGit2Sharp 2.0.0``() =

model.GetLibReferences(SinglePlatform (DotNetFramework FrameworkVersion.V4_Client)) |> shouldContain @"..\LibGit2Sharp\lib\net40\LibGit2Sharp.dll"

let propertyNodes,targetsNodes,chooseNode,propertyChooseNode,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expectedReferenceNodes)

propertyChooseNode.OuterXml
ctx.FrameworkSpecificPropertyChooseNode.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expectedPropertyDefinitionNodes)

propertyNodes |> Seq.length |> shouldEqual 1
targetsNodes |> Seq.length |> shouldEqual 0
ctx.FrameworkSpecificPropsNodes |> Seq.length |> shouldEqual 1
ctx.FrameworkSpecificTargetsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalPropsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalTargetsNodes |> Seq.length |> shouldEqual 0

(propertyNodes |> Seq.head).OuterXml
(ctx.FrameworkSpecificPropsNodes |> Seq.head).OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expectedPropertyNodes)
9 changes: 7 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/Microsoft.Bcl.Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ open Paket
open NUnit.Framework
open FsUnit
open Paket.Domain
open Paket.TestHelpers

[<Test>]
let ``should not install targets node for Microsoft.Bcl.Build``() =
ensureDir()
let model =
InstallModel.CreateFromLibs(PackageName "Microsoft.Bcl.Build", SemVer.Parse "1.0.21", [],
[ ],
Expand All @@ -16,6 +18,9 @@ let ``should not install targets node for Microsoft.Bcl.Build``() =

model.GetTargetsFiles(SinglePlatform (DotNetFramework FrameworkVersion.V4)) |> shouldContain @"..\Microsoft.Bcl.Build\build\Microsoft.Bcl.Build.targets"

let propertyNodes,_,_,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,false,None)
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,false,KnownTargetProfiles.AllProfiles,None)

propertyNodes |> Seq.length |> shouldEqual 0
ctx.FrameworkSpecificPropsNodes |> Seq.length |> shouldEqual 0
ctx.FrameworkSpecificTargetsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalPropsNodes |> Seq.length |> shouldEqual 0
ctx.GlobalTargetsNodes |> Seq.length |> shouldEqual 0
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let ``should generate Xml for Microsoft.CodeAnalysis.Analyzers in CSharp project
ensureDir()
let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyCsharpGuid.csprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedCs)
Expand All @@ -57,8 +57,8 @@ let ``should generate Xml for RefactoringEssentials in VisualBasic project``() =
ensureDir()
let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyVbGuid.vbprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedVb)
Expand All @@ -77,8 +77,8 @@ let ``should generate Xml for Microsoft.CodeAnalysis.Analyzers 1.0.0-rc2``() =
ensureDir()
let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyCsharpGuid.csprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(oldModel, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(oldModel, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expectedEmpty)
Expand Down
4 changes: 2 additions & 2 deletions tests/Paket.Tests/InstallModel/Xml/Plossum.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let ``should generate Xml for Plossum``() =
[],
Nuspec.All)

let _,targetsNodes,chooseNode,_,_ = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
chooseNode.Head.OuterXml
let ctx = ProjectFile.TryLoad("./ProjectFile/TestData/Empty.fsprojtest").Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.ChooseNodes.Head.OuterXml
|> normalizeXml
|> shouldEqual (normalizeXml expected)
8 changes: 4 additions & 4 deletions tests/Paket.Tests/InstallModel/Xml/RefactoringEssentials.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ let ``should generate Xml for RefactoringEssentials in CSharp project``() =

let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyCsharpGuid.csprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expected)
Expand All @@ -47,8 +47,8 @@ let ``should generate Xml for RefactoringEssentials in VisualBasic project``() =

let project = ProjectFile.TryLoad("./ProjectFile/TestData/EmptyVbGuid.vbprojtest")
Assert.IsTrue(project.IsSome)
let _,_,_,_,analyzerNodes = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,None)
analyzerNodes
let ctx = project.Value.GenerateXml(model, System.Collections.Generic.HashSet<_>(),Map.empty,Some true,true,KnownTargetProfiles.AllProfiles,None)
ctx.AnalyzersNode
|> (fun n -> n.OuterXml)
|> normalizeXml
|> shouldEqual (normalizeXml expected)
Loading

0 comments on commit 2039fee

Please sign in to comment.