From b8d03011db57b3b5df66c31d3a1564352c947cd1 Mon Sep 17 00:00:00 2001 From: enricosada Date: Wed, 6 May 2015 23:30:12 +0200 Subject: [PATCH 1/2] add regression tests --- .../src/unittests/Tests.ProjectSystem.RoundTrip.fs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vsintegration/src/unittests/Tests.ProjectSystem.RoundTrip.fs b/vsintegration/src/unittests/Tests.ProjectSystem.RoundTrip.fs index 600adeb3ba1..6fa28965eba 100644 --- a/vsintegration/src/unittests/Tests.ProjectSystem.RoundTrip.fs +++ b/vsintegration/src/unittests/Tests.ProjectSystem.RoundTrip.fs @@ -100,6 +100,17 @@ type RoundTrip() = CompileItem @"A\qux.fs"] this.``FsprojRoundtrip.PositiveTest``(MSBuildItems origItems, MSBuildItems expectedItems) + [] + member public this.``FsprojRoundTrip.Regression.FoldersWithSameName``() = + let items = MSBuildItems [CompileItem @"First\Second\bar.fs" + CompileItem @"Second\qux.fs"] + this.``FsprojRoundtrip.PositiveTest``(items, items) + + [] + member public this.``FsprojRoundTrip.Regression.FoldersWithSameName2``() = + let items = MSBuildItems [CompileItem @"First\First\bar.fs"] + this.``FsprojRoundtrip.PositiveTest``(items, items) + member this.``Fsproj.NegativeTest``(items : MSBuildItems) = DoWithTempFile "Test.fsproj" (fun file -> File.AppendAllText(file, TheTests.SimpleFsprojText([], [], items.ToString())) From 2c37b20d129a231a16d2e64cbf2f007aa73e40c4 Mon Sep 17 00:00:00 2001 From: enricosada Date: Wed, 29 Apr 2015 18:57:04 +0200 Subject: [PATCH 2/2] fix invalid already rendered folder error fix invalid already rendered folder error when a project contains folders with same name --- .../src/vs/FsPkgs/FSharp.Project/FS/MSBuildUtilities.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/MSBuildUtilities.fs b/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/MSBuildUtilities.fs index 3e6c64bc697..97525f5c9dd 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/MSBuildUtilities.fs +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/MSBuildUtilities.fs @@ -120,7 +120,7 @@ type internal MSBuildUtilities() = // push folder Inc(curPathParts) curPathParts.Add(pathParts.[curPathParts.Count]) // e.g. transition from A\ to A\D\E\bar.fs - if not(alreadyRenderedFolders.Add(curPathParts)) && throwIfCannotRender then + if not(alreadyRenderedFolders.Add(new List(curPathParts))) && throwIfCannotRender then raise <| new InvalidOperationException(String.Format(FSharpSR.GetString(FSharpSR.ProjectRenderFolderMultiple), projectNode.ProjectFile, bi.Include)) Inc(curPathParts) if bi.ItemType = ProjectFileConstants.Folder then